diff --git a/.librarian/generator-input/client-post-processing/debugging.yaml b/.librarian/generator-input/client-post-processing/debugging.yaml new file mode 100644 index 000000000000..10b056db12d4 --- /dev/null +++ b/.librarian/generator-input/client-post-processing/debugging.yaml @@ -0,0 +1,29 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +description: debugging issue 14882 +url: https://github.com/googleapis/google-cloud-python/issues/14882 +replacements: + - paths: [ + packages/google-cloud-compute-v1beta/noxfile.py + ] + before: | + session.run\( + \ "py.test", + \ "--quiet", + after: | + session.run( + "py.test", + "-vvv", + "--quiet", + count: 1 \ No newline at end of file diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 9116d6a6f933..07b4ee73d33f 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1227,7 +1227,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-compute-v1beta version: 0.3.0 - last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd + last_generated_commit: 5400ccce473c439885bd6bf2924fd242271bfcab apis: - path: google/cloud/compute/v1beta service_config: compute_v1beta.yaml diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst new file mode 100644 index 000000000000..f25d9060bd11 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst @@ -0,0 +1,10 @@ +GlobalVmExtensionPolicies +------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.global_vm_extension_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst new file mode 100644 index 000000000000..6a48ef5a240a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst @@ -0,0 +1,10 @@ +RegionBackendBuckets +-------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_backend_buckets + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_backend_buckets.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst new file mode 100644 index 000000000000..3a98448c3863 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst @@ -0,0 +1,10 @@ +RegionCompositeHealthChecks +--------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_composite_health_checks + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_composite_health_checks.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst new file mode 100644 index 000000000000..615a74ff8f0a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst @@ -0,0 +1,10 @@ +RegionHealthAggregationPolicies +------------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_health_aggregation_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst index f0a2044680b5..cdffb0fe0e56 100644 --- a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst @@ -24,6 +24,7 @@ Services for Google Cloud Compute v1beta API global_operations global_organization_operations global_public_delegated_prefixes + global_vm_extension_policies health_checks image_family_views images @@ -60,11 +61,14 @@ Services for Google Cloud Compute v1beta API public_advertised_prefixes public_delegated_prefixes region_autoscalers + region_backend_buckets region_backend_services region_commitments + region_composite_health_checks region_disks region_disk_settings region_disk_types + region_health_aggregation_policies region_health_checks region_health_check_services region_health_sources @@ -120,3 +124,4 @@ Services for Google Cloud Compute v1beta API wire_groups zone_operations zones + zone_vm_extension_policies diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst new file mode 100644 index 000000000000..16f27561d3e8 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst @@ -0,0 +1,10 @@ +ZoneVmExtensionPolicies +----------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.zone_vm_extension_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py index bd5b2a60e7ee..a38de4177ef9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py @@ -41,6 +41,7 @@ from .services.global_public_delegated_prefixes import ( GlobalPublicDelegatedPrefixesClient, ) +from .services.global_vm_extension_policies import GlobalVmExtensionPoliciesClient from .services.health_checks import HealthChecksClient from .services.image_family_views import ImageFamilyViewsClient from .services.images import ImagesClient @@ -79,11 +80,16 @@ from .services.public_advertised_prefixes import PublicAdvertisedPrefixesClient from .services.public_delegated_prefixes import PublicDelegatedPrefixesClient from .services.region_autoscalers import RegionAutoscalersClient +from .services.region_backend_buckets import RegionBackendBucketsClient from .services.region_backend_services import RegionBackendServicesClient from .services.region_commitments import RegionCommitmentsClient +from .services.region_composite_health_checks import RegionCompositeHealthChecksClient from .services.region_disk_settings import RegionDiskSettingsClient from .services.region_disk_types import RegionDiskTypesClient from .services.region_disks import RegionDisksClient +from .services.region_health_aggregation_policies import ( + RegionHealthAggregationPoliciesClient, +) from .services.region_health_check_services import RegionHealthCheckServicesClient from .services.region_health_checks import RegionHealthChecksClient from .services.region_health_sources import RegionHealthSourcesClient @@ -142,12 +148,16 @@ from .services.vpn_tunnels import VpnTunnelsClient from .services.wire_groups import WireGroupsClient from .services.zone_operations import ZoneOperationsClient +from .services.zone_vm_extension_policies import ZoneVmExtensionPoliciesClient from .services.zones import ZonesClient from .types.compute import ( AbandonInstancesInstanceGroupManagerRequest, AbandonInstancesRegionInstanceGroupManagerRequest, AcceleratorConfig, Accelerators, + AcceleratorTopologiesInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState, AcceleratorType, AcceleratorTypeAggregatedList, AcceleratorTypeList, @@ -187,12 +197,14 @@ AggregatedListAcceleratorTypesRequest, AggregatedListAddressesRequest, AggregatedListAutoscalersRequest, + AggregatedListBackendBucketsRequest, AggregatedListBackendServicesRequest, AggregatedListDisksRequest, AggregatedListDiskTypesRequest, AggregatedListForwardingRulesRequest, AggregatedListFutureReservationsRequest, AggregatedListGlobalOperationsRequest, + AggregatedListGlobalVmExtensionPoliciesRequest, AggregatedListHealthChecksRequest, AggregatedListInstanceGroupManagersRequest, AggregatedListInstanceGroupsRequest, @@ -211,6 +223,8 @@ AggregatedListPacketMirroringsRequest, AggregatedListPublicDelegatedPrefixesRequest, AggregatedListRegionCommitmentsRequest, + AggregatedListRegionCompositeHealthChecksRequest, + AggregatedListRegionHealthAggregationPoliciesRequest, AggregatedListRegionHealthSourcesRequest, AggregatedListRegionNetworkPoliciesRequest, AggregatedListReservationsRequest, @@ -272,6 +286,7 @@ AWSV4Signature, Backend, BackendBucket, + BackendBucketAggregatedList, BackendBucketCdnPolicy, BackendBucketCdnPolicyBypassCacheOnRequestHeader, BackendBucketCdnPolicyCacheKeyPolicy, @@ -279,6 +294,7 @@ BackendBucketList, BackendBucketListUsable, BackendBucketParams, + BackendBucketsScopedList, BackendBucketUsedBy, BackendCustomMetric, BackendService, @@ -349,6 +365,10 @@ CommitmentList, CommitmentResourceStatus, CommitmentsScopedList, + CompositeHealthCheck, + CompositeHealthCheckAggregatedList, + CompositeHealthCheckList, + CompositeHealthChecksScopedList, ConfidentialInstanceConfig, ConnectionDraining, ConsistentHashLoadBalancerSettings, @@ -420,8 +440,11 @@ DeletePublicAdvertisedPrefixeRequest, DeletePublicDelegatedPrefixeRequest, DeleteRegionAutoscalerRequest, + DeleteRegionBackendBucketRequest, DeleteRegionBackendServiceRequest, + DeleteRegionCompositeHealthCheckRequest, DeleteRegionDiskRequest, + DeleteRegionHealthAggregationPolicyRequest, DeleteRegionHealthCheckRequest, DeleteRegionHealthCheckServiceRequest, DeleteRegionHealthSourceRequest, @@ -472,6 +495,7 @@ DeleteWireGroupRequest, DeleteZoneOperationRequest, DeleteZoneOperationResponse, + DeleteZoneVmExtensionPolicyRequest, Denied, DeprecateImageRequest, DeprecationStatus, @@ -572,6 +596,7 @@ GetAssociationRegionNetworkFirewallPolicyRequest, GetAssociationRegionNetworkPolicyRequest, GetAutoscalerRequest, + GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, GetBackendBucketRequest, GetBackendServiceRequest, GetCrossSiteNetworkRequest, @@ -595,6 +620,7 @@ GetGlobalOperationRequest, GetGlobalOrganizationOperationRequest, GetGlobalPublicDelegatedPrefixeRequest, + GetGlobalVmExtensionPolicyRequest, GetGuestAttributesInstanceRequest, GetHealthBackendServiceRequest, GetHealthCheckRequest, @@ -616,12 +642,15 @@ GetIamPolicyNetworkFirewallPolicyRequest, GetIamPolicyNodeGroupRequest, GetIamPolicyNodeTemplateRequest, + GetIamPolicyRegionBackendBucketRequest, GetIamPolicyRegionBackendServiceRequest, GetIamPolicyRegionDiskRequest, GetIamPolicyRegionInstantSnapshotRequest, GetIamPolicyRegionNetworkFirewallPolicyRequest, GetIamPolicyRegionSnapshotRequest, + GetIamPolicyReservationBlockRequest, GetIamPolicyReservationRequest, + GetIamPolicyReservationSubBlockRequest, GetIamPolicyResourcePolicyRequest, GetIamPolicyServiceAttachmentRequest, GetIamPolicySnapshotRequest, @@ -670,11 +699,14 @@ GetPublicAdvertisedPrefixeRequest, GetPublicDelegatedPrefixeRequest, GetRegionAutoscalerRequest, + GetRegionBackendBucketRequest, GetRegionBackendServiceRequest, GetRegionCommitmentRequest, + GetRegionCompositeHealthCheckRequest, GetRegionDiskRequest, GetRegionDiskSettingRequest, GetRegionDiskTypeRequest, + GetRegionHealthAggregationPolicyRequest, GetRegionHealthCheckRequest, GetRegionHealthCheckServiceRequest, GetRegionHealthSourceRequest, @@ -744,12 +776,21 @@ GetXpnResourcesProjectsRequest, GetZoneOperationRequest, GetZoneRequest, + GetZoneVmExtensionPolicyRequest, GlobalAddressesMoveRequest, GlobalNetworkEndpointGroupsAttachEndpointsRequest, GlobalNetworkEndpointGroupsDetachEndpointsRequest, GlobalOrganizationSetPolicyRequest, GlobalSetLabelsRequest, GlobalSetPolicyRequest, + GlobalVmExtensionPolicy, + GlobalVmExtensionPolicyExtensionPolicy, + GlobalVmExtensionPolicyInstanceSelector, + GlobalVmExtensionPolicyLabelSelector, + GlobalVmExtensionPolicyRolloutOperation, + GlobalVmExtensionPolicyRolloutOperationRolloutInput, + GlobalVmExtensionPolicyRolloutOperationRolloutStatus, + GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata, GroupMaintenanceInfo, GRPCHealthCheck, GRPCTLSHealthCheck, @@ -757,6 +798,10 @@ GuestAttributesEntry, GuestAttributesValue, GuestOsFeature, + HealthAggregationPoliciesScopedList, + HealthAggregationPolicy, + HealthAggregationPolicyAggregatedList, + HealthAggregationPolicyList, HealthCheck, HealthCheckList, HealthCheckLogConfig, @@ -837,9 +882,12 @@ InsertPublicAdvertisedPrefixeRequest, InsertPublicDelegatedPrefixeRequest, InsertRegionAutoscalerRequest, + InsertRegionBackendBucketRequest, InsertRegionBackendServiceRequest, InsertRegionCommitmentRequest, + InsertRegionCompositeHealthCheckRequest, InsertRegionDiskRequest, + InsertRegionHealthAggregationPolicyRequest, InsertRegionHealthCheckRequest, InsertRegionHealthCheckServiceRequest, InsertRegionHealthSourceRequest, @@ -883,6 +931,7 @@ InsertVpnGatewayRequest, InsertVpnTunnelRequest, InsertWireGroupRequest, + InsertZoneVmExtensionPolicyRequest, Instance, InstanceAggregatedList, InstanceConsumptionData, @@ -912,6 +961,8 @@ InstanceGroupManagersCreateInstancesRequest, InstanceGroupManagersDeleteInstancesRequest, InstanceGroupManagersDeletePerInstanceConfigsReq, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo, InstanceGroupManagersListErrorsResponse, InstanceGroupManagersListManagedInstancesResponse, InstanceGroupManagersListPerInstanceConfigsResp, @@ -1009,7 +1060,12 @@ InterconnectAttachmentGroupsListResponse, InterconnectAttachmentGroupsOperationalStatus, InterconnectAttachmentGroupsOperationalStatusAttachmentStatus, + InterconnectAttachmentL2Forwarding, + InterconnectAttachmentL2ForwardingApplianceMapping, + InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping, + InterconnectAttachmentL2ForwardingGeneveHeader, InterconnectAttachmentList, + InterconnectAttachmentParams, InterconnectAttachmentPartnerMetadata, InterconnectAttachmentPrivateInfo, InterconnectAttachmentsScopedList, @@ -1047,6 +1103,7 @@ InterconnectMacsecConfigPreSharedKey, InterconnectMacsecPreSharedKey, InterconnectOutageNotification, + InterconnectParams, InterconnectRemoteLocation, InterconnectRemoteLocationConstraints, InterconnectRemoteLocationConstraintsSubnetLengthRange, @@ -1135,10 +1192,13 @@ ListPublicDelegatedPrefixesRequest, ListReferrersInstancesRequest, ListRegionAutoscalersRequest, + ListRegionBackendBucketsRequest, ListRegionBackendServicesRequest, ListRegionCommitmentsRequest, + ListRegionCompositeHealthChecksRequest, ListRegionDisksRequest, ListRegionDiskTypesRequest, + ListRegionHealthAggregationPoliciesRequest, ListRegionHealthCheckServicesRequest, ListRegionHealthChecksRequest, ListRegionHealthSourcesRequest, @@ -1189,6 +1249,7 @@ ListUrlMapsRequest, ListUsableBackendBucketsRequest, ListUsableBackendServicesRequest, + ListUsableRegionBackendBucketsRequest, ListUsableRegionBackendServicesRequest, ListUsableSubnetworksRequest, ListVpnGatewaysRequest, @@ -1197,6 +1258,7 @@ ListXpnHostsProjectsRequest, ListZoneOperationsRequest, ListZonesRequest, + ListZoneVmExtensionPoliciesRequest, LocalDisk, LocalizedMessage, LocationPolicy, @@ -1370,8 +1432,11 @@ PatchPublicAdvertisedPrefixeRequest, PatchPublicDelegatedPrefixeRequest, PatchRegionAutoscalerRequest, + PatchRegionBackendBucketRequest, PatchRegionBackendServiceRequest, + PatchRegionCompositeHealthCheckRequest, PatchRegionDiskSettingRequest, + PatchRegionHealthAggregationPolicyRequest, PatchRegionHealthCheckRequest, PatchRegionHealthCheckServiceRequest, PatchRegionHealthSourceRequest, @@ -1570,6 +1635,7 @@ ResourceStatus, ResourceStatusEffectiveInstanceMetadata, ResourceStatusPhysicalHostTopology, + ResourceStatusReservationConsumptionInfo, ResourceStatusScheduling, ResourceStatusShutdownDetails, ResumeInstanceRequest, @@ -1697,12 +1763,15 @@ SetIamPolicyNetworkFirewallPolicyRequest, SetIamPolicyNodeGroupRequest, SetIamPolicyNodeTemplateRequest, + SetIamPolicyRegionBackendBucketRequest, SetIamPolicyRegionBackendServiceRequest, SetIamPolicyRegionDiskRequest, SetIamPolicyRegionInstantSnapshotRequest, SetIamPolicyRegionNetworkFirewallPolicyRequest, SetIamPolicyRegionSnapshotRequest, + SetIamPolicyReservationBlockRequest, SetIamPolicyReservationRequest, + SetIamPolicyReservationSubBlockRequest, SetIamPolicyResourcePolicyRequest, SetIamPolicyServiceAttachmentRequest, SetIamPolicySnapshotRequest, @@ -1934,9 +2003,12 @@ TestIamPermissionsNodeTemplateRequest, TestIamPermissionsPacketMirroringRequest, TestIamPermissionsRegionAutoscalerRequest, + TestIamPermissionsRegionBackendBucketRequest, TestIamPermissionsRegionBackendServiceRequest, TestIamPermissionsRegionCommitmentRequest, + TestIamPermissionsRegionCompositeHealthCheckRequest, TestIamPermissionsRegionDiskRequest, + TestIamPermissionsRegionHealthAggregationPolicyRequest, TestIamPermissionsRegionHealthCheckRequest, TestIamPermissionsRegionHealthCheckServiceRequest, TestIamPermissionsRegionHealthSourceRequest, @@ -1952,7 +2024,9 @@ TestIamPermissionsRegionTargetHttpsProxyRequest, TestIamPermissionsRegionTargetTcpProxyRequest, TestIamPermissionsRegionUrlMapRequest, + TestIamPermissionsReservationBlockRequest, TestIamPermissionsReservationRequest, + TestIamPermissionsReservationSubBlockRequest, TestIamPermissionsResourcePolicyRequest, TestIamPermissionsRouteRequest, TestIamPermissionsRouterRequest, @@ -2010,6 +2084,7 @@ UpdateShieldedVmConfigInstanceRequest, UpdateStoragePoolRequest, UpdateUrlMapRequest, + UpdateZoneVmExtensionPolicyRequest, UrlMap, UrlMapList, UrlMapReference, @@ -2031,6 +2106,13 @@ VmEndpointNatMappingsInterfaceNatMappings, VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, VmEndpointNatMappingsList, + VmExtensionPoliciesScopedList, + VmExtensionPolicy, + VmExtensionPolicyAggregatedListResponse, + VmExtensionPolicyExtensionPolicy, + VmExtensionPolicyInstanceSelector, + VmExtensionPolicyLabelSelector, + VmExtensionPolicyList, VpnGateway, VpnGatewayAggregatedList, VpnGatewayList, @@ -2073,6 +2155,7 @@ Zone, ZoneList, ZoneSetLabelsRequest, + ZoneSetNestedPolicyRequest, ZoneSetPolicyRequest, ) @@ -2081,6 +2164,9 @@ "AbandonInstancesInstanceGroupManagerRequest", "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -2124,12 +2210,14 @@ "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDiskTypesRequest", "AggregatedListDisksRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -2148,6 +2236,8 @@ "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -2209,6 +2299,7 @@ "AutoscalingPolicyScalingSchedule", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -2218,6 +2309,7 @@ "BackendBucketParams", "BackendBucketUsedBy", "BackendBucketsClient", + "BackendBucketsScopedList", "BackendCustomMetric", "BackendService", "BackendServiceAggregatedList", @@ -2288,6 +2380,10 @@ "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -2360,8 +2456,11 @@ "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -2412,6 +2511,7 @@ "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -2522,6 +2622,7 @@ "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -2545,6 +2646,7 @@ "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -2566,12 +2668,15 @@ "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -2620,11 +2725,14 @@ "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -2694,6 +2802,7 @@ "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesClient", "GlobalAddressesMoveRequest", "GlobalForwardingRulesClient", @@ -2706,6 +2815,15 @@ "GlobalPublicDelegatedPrefixesClient", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPoliciesClient", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GuestAttributes", "GuestAttributesEntry", @@ -2714,6 +2832,10 @@ "HTTP2HealthCheck", "HTTPHealthCheck", "HTTPSHealthCheck", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -2794,9 +2916,12 @@ "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -2840,6 +2965,7 @@ "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -2882,6 +3008,8 @@ "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -2974,7 +3102,12 @@ "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsClient", @@ -3015,6 +3148,7 @@ "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -3107,10 +3241,13 @@ "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDiskTypesRequest", "ListRegionDisksRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -3161,6 +3298,7 @@ "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -3168,6 +3306,7 @@ "ListWireGroupsRequest", "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", + "ListZoneVmExtensionPoliciesRequest", "ListZonesRequest", "LocalDisk", "LocalizedMessage", @@ -3355,8 +3494,11 @@ "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -3440,9 +3582,11 @@ "RegionAddressesMoveRequest", "RegionAutoscalerList", "RegionAutoscalersClient", + "RegionBackendBucketsClient", "RegionBackendServicesClient", "RegionCommitmentsClient", "RegionCommitmentsUpdateReservationsRequest", + "RegionCompositeHealthChecksClient", "RegionDiskSettingsClient", "RegionDiskTypeList", "RegionDiskTypesClient", @@ -3451,6 +3595,7 @@ "RegionDisksRemoveResourcePoliciesRequest", "RegionDisksResizeRequest", "RegionDisksStartAsyncReplicationRequest", + "RegionHealthAggregationPoliciesClient", "RegionHealthCheckServicesClient", "RegionHealthChecksClient", "RegionHealthSourcesClient", @@ -3595,6 +3740,7 @@ "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", @@ -3727,12 +3873,15 @@ "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -3978,9 +4127,12 @@ "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -3996,7 +4148,9 @@ "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -4054,6 +4208,7 @@ "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -4076,6 +4231,13 @@ "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -4122,6 +4284,8 @@ "ZoneList", "ZoneOperationsClient", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", + "ZoneVmExtensionPoliciesClient", "ZonesClient", ) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json index 3e84ca8ad475..0622dd5e880d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json @@ -151,6 +151,11 @@ "add_signed_url_key" ] }, + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, "Delete": { "methods": [ "delete" @@ -1019,6 +1024,25 @@ } } }, + "GlobalVmExtensionPolicies": { + "clients": { + "rest": { + "libraryClient": "GlobalVmExtensionPoliciesClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Get": { + "methods": [ + "get" + ] + } + } + } + } + }, "HealthChecks": { "clients": { "rest": { @@ -1225,6 +1249,11 @@ "get" ] }, + "GetAvailableAcceleratorTopologies": { + "methods": [ + "get_available_accelerator_topologies" + ] + }, "Insert": { "methods": [ "insert" @@ -3078,6 +3107,60 @@ } } }, + "RegionBackendBuckets": { + "clients": { + "rest": { + "libraryClient": "RegionBackendBucketsClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "ListUsable": { + "methods": [ + "list_usable" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionBackendServices": { "clients": { "rest": { @@ -3191,6 +3274,50 @@ } } }, + "RegionCompositeHealthChecks": { + "clients": { + "rest": { + "libraryClient": "RegionCompositeHealthChecksClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionDiskSettings": { "clients": { "rest": { @@ -3323,6 +3450,50 @@ } } }, + "RegionHealthAggregationPolicies": { + "clients": { + "rest": { + "libraryClient": "RegionHealthAggregationPoliciesClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionHealthCheckServices": { "clients": { "rest": { @@ -4487,6 +4658,11 @@ "get" ] }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, "List": { "methods": [ "list" @@ -4496,6 +4672,16 @@ "methods": [ "perform_maintenance" ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] } } } @@ -4511,6 +4697,11 @@ "get" ] }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, "List": { "methods": [ "list" @@ -4525,6 +4716,16 @@ "methods": [ "report_faulty" ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] } } } @@ -5864,6 +6065,40 @@ } } }, + "ZoneVmExtensionPolicies": { + "clients": { + "rest": { + "libraryClient": "ZoneVmExtensionPoliciesClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, "Zones": { "clients": { "rest": { diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py index bd9a90ee81d3..e206bced6f6f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py @@ -704,8 +704,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of accelerator types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of accelerator types. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -893,13 +894,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.AcceleratorType: Represents an Accelerator Type - resource. Google Cloud Platform provides - graphics processing units (accelerators) - that you can add to VM instances to - improve or accelerate performance when - working with intensive workloads. For - more information, read GPUs on Compute - Engine. + resource. + Google Cloud Platform provides graphics + processing units (accelerators) that you + can add to VM instances to improve or + accelerate performance when working with + intensive workloads. For more + information, readGPUs on Compute Engine. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py index 6eb3e7a069b5..4c3b54ce90fd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py @@ -541,13 +541,13 @@ def __call__( Returns: ~.compute.AcceleratorType: Represents an Accelerator Type - resource. Google Cloud Platform provides - graphics processing units (accelerators) - that you can add to VM instances to - improve or accelerate performance when - working with intensive workloads. For - more information, read GPUs on Compute - Engine. + resource. + Google Cloud Platform provides graphics + processing units (accelerators) that you + can add to VM instances to improve or + accelerate performance when working with + intensive workloads. For more + information, readGPUs on Compute Engine. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py index 0f3b4b02df86..1aa2f8624a94 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py @@ -694,9 +694,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of addresses. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of addresses. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1170,13 +1171,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* [Global (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) - \* [Regional (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) - For more information, see Reserving a static external IP - address. + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + \* [Global (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) + \* [Regional (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) + + For more information, see Reserving a static external + IP address. """ # Create or coerce a protobuf request object. @@ -1530,8 +1535,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of addresses contained within the - specified region. + r"""Retrieves a list of addresses contained within + the specified region. .. code-block:: python @@ -1994,7 +1999,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an Address. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2145,7 +2150,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Address. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py index 28cc01f4fd18..8a820df751d3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py @@ -800,21 +800,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -962,11 +973,15 @@ def __call__( Returns: ~.compute.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -1112,21 +1127,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1421,21 +1447,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1586,21 +1623,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py index 0eaa751e038a..3e9961329dbb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py @@ -694,9 +694,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of autoscalers. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of autoscalers. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1165,18 +1166,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - [Zonal](/compute/docs/reference/rest/beta/autoscalers) - \* - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) - Use autoscalers to automatically add or delete instances - from a managed instance group according to your defined - autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - [Zonal](/compute/docs/reference/rest/beta/autoscalers) + - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) + + Use autoscalers to automatically add or delete + instances from a managed instance group according to + your defined autoscaling policy. For more + information, read Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ # Create or coerce a protobuf request object. @@ -1530,8 +1536,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of autoscalers contained within the - specified zone. + r"""Retrieves a list of autoscalers contained within + the specified zone. .. code-block:: python @@ -1669,9 +1675,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1801,9 +1807,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py index 9b83ecf5fb94..0d95cbbc7bd2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py @@ -805,21 +805,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -968,18 +979,23 @@ def __call__( Returns: ~.compute.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - `Zonal `__ - \* - `Regional `__ + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - `Zonal `__ + - `Regional `__ + Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ @@ -1125,21 +1141,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1440,21 +1467,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1763,21 +1801,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py index 65dbea653811..7c6398311296 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py @@ -986,6 +986,134 @@ def error_code(self): # Done; return the response. return response + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListBackendBucketsRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all BackendBucket resources, regional and + global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. 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 compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.BackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListBackendBucketsRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest, dict]): + The request object. A request message for + BackendBuckets.AggregatedList. See the + method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.backend_buckets.pagers.AggregatedListPager: + 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. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.AggregatedListBackendBucketsRequest): + request = compute.AggregatedListBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def delete_unary( self, request: Optional[Union[compute.DeleteBackendBucketRequest, dict]] = None, @@ -1625,10 +1753,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendBucket: Represents a Cloud Storage Bucket - resource. This Cloud Storage bucket - resource is referenced by a URL map of a - load balancer. For more information, - read Backend Buckets. + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. """ # Create or coerce a protobuf request object. @@ -1751,28 +1880,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2340,9 +2477,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified BackendBucket resource with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2474,9 +2611,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendBucket resource with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2997,28 +3134,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py index b027a8958024..af86b8d652c7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py @@ -41,6 +41,85 @@ from google.cloud.compute_v1beta.types import compute +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketAggregatedList], + request: compute.AggregatedListBackendBucketsRequest, + response: compute.BackendBucketAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.BackendBucketsScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.BackendBucketsScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + class ListPager: """A pager for iterating through ``list`` requests. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py index 18e2cf2465a2..e8aea4a4b0ce 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), self.delete: gapic_v1.method.wrap_method( self.delete, default_timeout=None, @@ -223,6 +228,18 @@ def add_signed_url_key( ]: raise NotImplementedError() + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListBackendBucketsRequest], + Union[ + compute.BackendBucketAggregatedList, + Awaitable[compute.BackendBucketAggregatedList], + ], + ]: + raise NotImplementedError() + @property def delete( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py index 9bf3d0a957c3..7cb4592f96d2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py @@ -80,6 +80,14 @@ def post_add_signed_url_key(self, response): logging.log(f"Received response: {response}") return response + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + def pre_delete(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -229,6 +237,57 @@ def post_add_signed_url_key_with_metadata( """ return response, metadata + def pre_aggregated_list( + self, + request: compute.AggregatedListBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListBackendBucketsRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the BackendBuckets server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.BackendBucketAggregatedList + ) -> compute.BackendBucketAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the BackendBuckets server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.BackendBucketAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.BackendBucketAggregatedList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the BackendBuckets server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + def pre_delete( self, request: compute.DeleteBackendBucketRequest, @@ -946,21 +1005,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1063,6 +1133,154 @@ def __call__( ) return resp + class _AggregatedList( + _BaseBackendBucketsRestTransport._BaseAggregatedList, BackendBucketsRestStub + ): + def __hash__(self): + return hash("BackendBucketsRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListBackendBucketsRequest): + The request object. A request message for + BackendBuckets.AggregatedList. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketAggregatedList: + + """ + + http_options = ( + _BaseBackendBucketsRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseBackendBucketsRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseBackendBucketsRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.BackendBucketsClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.BackendBuckets", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = BackendBucketsRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketAggregatedList() + pb_resp = compute.BackendBucketAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketAggregatedList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.BackendBucketsClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.BackendBuckets", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _Delete(_BaseBackendBucketsRestTransport._BaseDelete, BackendBucketsRestStub): def __hash__(self): return hash("BackendBucketsRestTransport.Delete") @@ -1114,21 +1332,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1281,21 +1510,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1445,10 +1685,11 @@ def __call__( Returns: ~.compute.BackendBucket: Represents a Cloud Storage Bucket - resource. This Cloud Storage bucket - resource is referenced by a URL map of a - load balancer. For more information, - read Backend Buckets. + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. """ @@ -1596,26 +1837,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1763,21 +2055,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2230,21 +2533,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2404,21 +2718,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2576,26 +2901,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2902,21 +3278,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3029,6 +3416,17 @@ def add_signed_url_key( # In C++ this would require a dynamic_cast return self._AddSignedUrlKey(self._session, self._host, self._interceptor) # type: ignore + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListBackendBucketsRequest], + compute.BackendBucketAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + @property def delete( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py index c9b38f4f04ee..93e17e73326d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py @@ -143,6 +143,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/backendBuckets", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseBackendBucketsRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseDelete: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py index 18ee6462350a..ac5db8e68b67 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py @@ -1000,9 +1000,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all BackendService resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1755,21 +1756,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be + either regionally or globally scoped. + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) + + For more information, seeBackend Services. """ # Create or coerce a protobuf request object. @@ -1967,7 +1972,12 @@ def get_health( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.BackendServiceGroupHealth: r"""Gets the most recent health check results for this - BackendService. Example request body: { "group": + BackendService. + + Example request body: + + { + "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" } .. code-block:: python @@ -2157,28 +2167,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2246,7 +2264,7 @@ def insert_unary( ) -> compute.Operation: r"""Creates a BackendService resource in the specified project using the data included in the request. For more - information, see Backend services overview . + information, see Backend services overview. .. code-block:: python @@ -2363,7 +2381,7 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Creates a BackendService resource in the specified project using the data included in the request. For more - information, see Backend services overview . + information, see Backend services overview. .. code-block:: python @@ -2751,9 +2769,9 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + see Backend services overview. This method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2886,9 +2904,9 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + see Backend services overview. This method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -3421,28 +3439,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3518,8 +3544,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3662,8 +3688,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3963,7 +3989,7 @@ def update_unary( ) -> compute.Operation: r"""Updates the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. + seeBackend services overview. .. code-block:: python @@ -4096,7 +4122,7 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. + seeBackend services overview. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py index af9512246a61..cc49150d3549 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py @@ -1181,21 +1181,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1501,21 +1512,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1669,21 +1691,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1832,21 +1865,25 @@ def __call__( Returns: ~.compute.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be either + regionally or globally scoped. + + - `Global `__ + - `Regional `__ + + For more information, seeBackend Services. """ @@ -2311,26 +2348,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2480,21 +2568,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2949,21 +3048,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3123,21 +3233,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3297,26 +3418,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3472,21 +3644,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3798,21 +3981,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py index f5c578cea7eb..6d15e3e76666 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py @@ -1035,10 +1035,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.CrossSiteNetwork: A resource that represents a - cross-site network. You can use - cross-site networks to connect your - on-premises networks to each other - through Interconnect connections. + cross-site network. + You can use cross-site networks to + connect your on-premises networks to + each other through Interconnect + connections. """ # Create or coerce a protobuf request object. @@ -1487,9 +1488,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified cross-site network with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1621,9 +1622,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified cross-site network with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py index 3b50d0535eac..8de2d9283b44 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py @@ -495,21 +495,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -661,10 +672,11 @@ def __call__( Returns: ~.compute.CrossSiteNetwork: A resource that represents a - cross-site network. You can use - cross-site networks to connect your - on-premises networks to each other - through Interconnect connections. + cross-site network. + You can use cross-site networks to + connect your on-premises networks to + each other through Interconnect + connections. """ @@ -814,21 +826,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,21 +1162,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py index 157877e3526b..7cb81958ee4f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py @@ -478,21 +478,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py index c16eba7bfe4c..02100a287e4c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py @@ -691,9 +691,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of disk types. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of disk types. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -876,17 +877,24 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) - \* [Zonal](/compute/docs/reference/rest/beta/diskTypes) - You can choose from a variety of disk types based on - your needs. For more information, read Storage options. - The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) + - [Zonal](/compute/docs/reference/rest/beta/diskTypes) + + You can choose from a variety of disk types based on + your needs. For more information, readStorage + options. + + The diskTypes resource represents disk types for a + zonal persistent disk. For more information, + readZonal persistent disks. + + The regionDiskTypes resource represents disk types + for a regional persistent disk. For more information, + read Regional persistent disks. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py index ebc3d9d6fb10..e6f69fd98e7b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py @@ -530,18 +530,23 @@ def __call__( Returns: ~.compute.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - `Regional `__ - \* - `Zonal `__ + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + You can choose from a variety of disk types based on - your needs. For more information, read Storage options. + your needs. For more information, readStorage options. + The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + persistent disk. For more information, readZonal + persistent disks. + + The regionDiskTypes resource represents disk types for a + regional persistent disk. For more information, read + Regional persistent disks. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py index 4d4f39e133ad..eb27dab41521 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py @@ -1023,8 +1023,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of persistent disks. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of persistent disks. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1445,7 +1446,7 @@ def bulk_set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on many disks at once. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1581,7 +1582,7 @@ def bulk_set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on many disks at once. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -2061,8 +2062,8 @@ def delete_unary( r"""Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots - previously made from the disk. You must separately - delete snapshots. + previously made from the disk. You must separatelydelete + snapshots. .. code-block:: python @@ -2199,8 +2200,8 @@ def delete( r"""Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots - previously made from the disk. You must separately - delete snapshots. + previously made from the disk. You must separatelydelete + snapshots. .. code-block:: python @@ -2422,18 +2423,26 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - [Zonal](/compute/docs/reference/rest/beta/disks) \* - [Regional](/compute/docs/reference/rest/beta/regionDisks) - Persistent disks are required for running your VM - instances. Create both boot and non-boot (data) - persistent disks. For more information, read Persistent - Disks. For more storage options, read Storage options. - The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - [Zonal](/compute/docs/reference/rest/beta/disks) + - [Regional](/compute/docs/reference/rest/beta/regionDisks) + + Persistent disks are required for running your VM + instances. Create both boot and non-boot (data) + persistent disks. For more information, read + Persistent Disks. For more storage options, read + Storage options. + + The disks resource represents a zonal persistent + disk. For more information, readZonal persistent + disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ # Create or coerce a protobuf request object. @@ -2568,28 +2577,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2661,8 +2678,8 @@ def insert_unary( ) -> compute.Operation: r"""Creates a persistent disk in the specified project using the data in the request. You can create a disk - from a source (sourceImage, sourceSnapshot, or - sourceDisk) or create an empty 500 GB data disk by + from a source (sourceImage, sourceSnapshot, + orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. @@ -2797,8 +2814,8 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Creates a persistent disk in the specified project using the data in the request. You can create a disk - from a source (sourceImage, sourceSnapshot, or - sourceDisk) or create an empty 500 GB data disk by + from a source (sourceImage, sourceSnapshot, + orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. @@ -3424,8 +3441,8 @@ def resize_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Resizes the specified persistent disk. You can only - increase the size of the disk. + r"""Resizes the specified persistent disk. + You can only increase the size of the disk. .. code-block:: python @@ -3565,8 +3582,8 @@ def resize( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Resizes the specified persistent disk. You can only - increase the size of the disk. + r"""Resizes the specified persistent disk. + You can only increase the size of the disk. .. code-block:: python @@ -3801,28 +3818,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3898,7 +3923,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a disk. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -4044,7 +4069,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a disk. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -4216,8 +4241,8 @@ def start_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4367,8 +4392,8 @@ def start_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4540,8 +4565,9 @@ def stop_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python @@ -4674,8 +4700,9 @@ def stop_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py index d43b3c08912d..407fcf457a8a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py @@ -1251,21 +1251,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1572,21 +1583,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1741,21 +1763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1912,21 +1945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2081,21 +2125,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2241,18 +2296,24 @@ def __call__( Returns: ~.compute.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - `Zonal `__ \* - `Regional `__ + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options. + The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + For more information, readZonal persistent disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ @@ -2396,26 +2457,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2564,21 +2676,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2874,21 +2997,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3042,21 +3176,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3210,26 +3355,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3384,21 +3580,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3555,21 +3762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3725,21 +3943,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3892,21 +4121,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4220,21 +4460,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py index 29ca3786fc74..74e720e9fbed 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py @@ -1034,19 +1034,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ExternalVpnGateway: Represents an external VPN gateway. + External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to - your Google Cloud VPN gateway. To create - a highly available VPN from Google Cloud - Platform to your VPN gateway or another - cloud provider's VPN gateway, you must - create a external VPN gateway resource - with information about the other - gateway. For more information about - using external VPN gateways, see - Creating an HA VPN gateway and tunnel - pair to a peer VPN. + your Google Cloud VPN gateway. + + To create a highly available VPN from + Google Cloud Platform to your VPN + gateway or another cloud provider's VPN + gateway, you must create a external VPN + gateway resource with information about + the other gateway. + + For more information about using + external VPN gateways, see Creating an + HA VPN gateway and tunnel pair to a peer + VPN. """ # Create or coerce a protobuf request object. @@ -1497,8 +1501,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an ExternalVpnGateway. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -1636,8 +1640,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an ExternalVpnGateway. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py index 84e1b6c06c7b..151dd1ba4f14 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py @@ -557,21 +557,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -721,19 +732,23 @@ def __call__( Returns: ~.compute.ExternalVpnGateway: Represents an external VPN gateway. + External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to - your Google Cloud VPN gateway. To create - a highly available VPN from Google Cloud - Platform to your VPN gateway or another - cloud provider's VPN gateway, you must - create a external VPN gateway resource - with information about the other - gateway. For more information about - using external VPN gateways, see - Creating an HA VPN gateway and tunnel - pair to a peer VPN. + your Google Cloud VPN gateway. + + To create a highly available VPN from + Google Cloud Platform to your VPN + gateway or another cloud provider's VPN + gateway, you must create a external VPN + gateway resource with information about + the other gateway. + + For more information about using + external VPN gateways, see Creating an + HA VPN gateway and tunnel pair to a peer + VPN. """ @@ -883,21 +898,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1203,21 +1229,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py index 64d8ce6cab09..2218cfb55027 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py @@ -2272,28 +2272,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4892,28 +4900,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py index 1c107d13deb8..8aa92b0c61dd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py @@ -1448,21 +1448,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1618,21 +1629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1791,21 +1813,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1965,21 +1998,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2128,21 +2172,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2592,26 +2647,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3070,21 +3176,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3541,21 +3658,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3707,21 +3835,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3882,21 +4021,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4055,21 +4205,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4224,21 +4385,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4391,21 +4563,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4558,21 +4741,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4723,26 +4917,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py index f45e5f1b29e8..43c81ab3eb22 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py @@ -1015,10 +1015,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Firewall: Represents a Firewall Rule resource. + Firewall rules allow or deny ingress traffic to, and egress traffic from your - instances. For more information, read - Firewall rules. + instances. For more information, + readFirewall rules. """ # Create or coerce a protobuf request object. @@ -1464,9 +1465,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1596,9 +1597,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1888,10 +1889,10 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data - included in the request. Note that all fields will be - updated if using PUT, even fields that are not - specified. To update individual fields, please use PATCH - instead. + included in the request. + Note that all fields will be updated if using PUT, even + fields that are not specified. To update individual + fields, please use PATCH instead. .. code-block:: python @@ -2021,10 +2022,10 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data - included in the request. Note that all fields will be - updated if using PUT, even fields that are not - specified. To update individual fields, please use PATCH - instead. + included in the request. + Note that all fields will be updated if using PUT, even + fields that are not specified. To update individual + fields, please use PATCH instead. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py index 4cf33d8d8164..708645e2e59f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py @@ -592,21 +592,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -755,10 +766,11 @@ def __call__( Returns: ~.compute.Firewall: Represents a Firewall Rule resource. + Firewall rules allow or deny ingress traffic to, and egress traffic from your - instances. For more information, read - Firewall rules. + instances. For more information, + readFirewall rules. """ @@ -902,21 +914,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1212,21 +1235,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1535,21 +1569,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py index 479a4205972a..518f30abfa37 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py @@ -703,8 +703,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of forwarding rules. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of forwarding rules. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1186,18 +1187,22 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) - A forwarding rule and its corresponding IP address - represent the frontend configuration of a Google Cloud - load balancer. Forwarding rules can also reference - target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be + either regional or global in scope: + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) + + A forwarding rule and its corresponding IP address + represent the frontend configuration of a Google + Cloud load balancer. Forwarding rules can also + reference target instances and Cloud VPN Classic + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts + and Using protocol forwarding. """ # Create or coerce a protobuf request object. @@ -1699,9 +1704,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1845,9 +1850,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -2018,8 +2023,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the + Labeling Resources documentation. .. code-block:: python @@ -2170,8 +2175,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the + Labeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py index ea8e3323c33f..82d2cf4ef00c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py @@ -869,21 +869,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1034,18 +1045,22 @@ def __call__( Returns: ~.compute.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - `Global `__ - \* - `Regional `__ + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either + regional or global in scope: + + - `Global `__ + - `Regional `__ + A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + (targetVpnGateway). + + For more information, read Forwarding rule concepts and + Using protocol forwarding. """ @@ -1195,21 +1210,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1514,21 +1540,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1687,21 +1724,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1860,21 +1908,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py index dc410de92330..06b9cfc2e5fe 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py @@ -706,8 +706,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of future reservations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of future reservations. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py index 9cc54dcd44af..3e645a0a2ce2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py @@ -766,21 +766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -931,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1245,21 +1267,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1568,21 +1601,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py index 5afbf74d9202..49fd8b85f818 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py @@ -1028,13 +1028,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* [Global (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) - \* [Regional (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) - For more information, see Reserving a static external IP - address. + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + \* [Global (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) + \* [Regional (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) + + For more information, see Reserving a static external + IP address. """ # Create or coerce a protobuf request object. @@ -1778,7 +1782,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a GlobalAddress. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1914,7 +1918,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a GlobalAddress. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py index e5746c2b7714..597d14e696e0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py @@ -606,21 +606,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -771,11 +782,15 @@ def __call__( Returns: ~.compute.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -927,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1244,21 +1270,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1415,21 +1452,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py index 39f0f5801f7a..ffb321c7c14e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py @@ -1039,18 +1039,22 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) - A forwarding rule and its corresponding IP address - represent the frontend configuration of a Google Cloud - load balancer. Forwarding rules can also reference - target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be + either regional or global in scope: + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) + + A forwarding rule and its corresponding IP address + represent the frontend configuration of a Google + Cloud load balancer. Forwarding rules can also + reference target instances and Cloud VPN Classic + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts + and Using protocol forwarding. """ # Create or coerce a protobuf request object. @@ -1503,9 +1507,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1637,9 +1641,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1799,8 +1803,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling resources - documentation. + more about labels, read the + Labeling resources documentation. .. code-block:: python @@ -1938,8 +1942,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling resources - documentation. + more about labels, read the + Labeling resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py index 8f4300c49107..7edded39f26a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py @@ -669,21 +669,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -832,18 +843,22 @@ def __call__( Returns: ~.compute.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - `Global `__ - \* - `Regional `__ + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either + regional or global in scope: + + - `Global `__ + - `Regional `__ + A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + (targetVpnGateway). + + For more information, read Forwarding rule concepts and + Using protocol forwarding. """ @@ -992,21 +1007,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1308,21 +1334,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1478,21 +1515,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1648,21 +1696,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py index e9e66ddada43..0974c81b2a88 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py @@ -1704,13 +1704,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py index f678ea50337a..7bec90ba00ba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py @@ -629,21 +629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -800,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -967,21 +989,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,13 +1172,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1292,21 +1326,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py index aa33f45379d0..c6adc767d0ab 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py @@ -701,8 +701,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of all operations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of all operations. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1006,23 +1007,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1217,13 +1225,17 @@ def wait( from the ``GET`` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be ``DONE`` or still in progress. - This method is called on a best-effort basis. Specifically: - In - uncommon cases, when the server is overloaded, the request might - return before the default deadline is reached, or might return - after zero seconds. - If the default deadline is reached, there - is no guarantee that the operation is actually done when the - method returns. Be prepared to retry if the operation is not - ``DONE``. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1280,23 +1292,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py index 8426cb9e8db7..3f9a55fe133e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py @@ -801,21 +801,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1112,21 +1123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py index daf0ac4a54a7..5378466bd15b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py @@ -880,23 +880,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py index d3816786a34a..90675a853a5e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py @@ -550,21 +550,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py index 8b560a497b7e..7ad9a306b8d2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py @@ -1524,7 +1524,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supportsPATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1668,7 +1668,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supportsPATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py index 1d01039446d0..e902b3da73b1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py @@ -509,21 +509,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -828,21 +839,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1145,21 +1167,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py new file mode 100644 index 000000000000..92899be015fe --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import GlobalVmExtensionPoliciesClient + +__all__ = ("GlobalVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py new file mode 100644 index 000000000000..323590ed7fdf --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py @@ -0,0 +1,977 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.cloud.compute_v1beta.services.global_vm_extension_policies import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalVmExtensionPoliciesTransport +from .transports.rest import GlobalVmExtensionPoliciesRestTransport + + +class GlobalVmExtensionPoliciesClientMeta(type): + """Metaclass for the GlobalVmExtensionPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[GlobalVmExtensionPoliciesTransport]] + _transport_registry["rest"] = GlobalVmExtensionPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[GlobalVmExtensionPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class GlobalVmExtensionPoliciesClient(metaclass=GlobalVmExtensionPoliciesClientMeta): + """The GlobalVmExtensionPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + GlobalVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + GlobalVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> GlobalVmExtensionPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + GlobalVmExtensionPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert == "true", use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + GlobalVmExtensionPoliciesTransport, + Callable[..., GlobalVmExtensionPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the global vm extension policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,GlobalVmExtensionPoliciesTransport,Callable[..., GlobalVmExtensionPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the GlobalVmExtensionPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = GlobalVmExtensionPoliciesClient._read_environment_variables() + self._client_cert_source = ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = GlobalVmExtensionPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, GlobalVmExtensionPoliciesTransport) + if transport_provided: + # transport is a GlobalVmExtensionPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(GlobalVmExtensionPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or GlobalVmExtensionPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[GlobalVmExtensionPoliciesTransport], + Callable[..., GlobalVmExtensionPoliciesTransport], + ] = ( + GlobalVmExtensionPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., GlobalVmExtensionPoliciesTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListGlobalVmExtensionPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all VM Extension Policy resources + available to the specified project. + + To prevent failure, it's recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. 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 compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.AggregatedListPager: + Response for the aggregated list of + VM extension policies. + 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. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListGlobalVmExtensionPoliciesRequest + ): + request = compute.AggregatedListGlobalVmExtensionPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.GlobalVmExtensionPolicy: + r"""Gets details of a global VM extension policy. + + .. 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 compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the GlobalVmExtensionPolicy + resource to return. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy: + Message describing + GlobalVmExtensionPolicy object. + + """ + # 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. + flattened_params = [project, global_vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetGlobalVmExtensionPolicyRequest): + request = compute.GetGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "GlobalVmExtensionPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("GlobalVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py new file mode 100644 index 000000000000..601d37cf6ec9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.VmExtensionPolicyAggregatedListResponse], + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + response: compute.VmExtensionPolicyAggregatedListResponse, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListGlobalVmExtensionPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.VmExtensionPolicyAggregatedListResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.VmExtensionPoliciesScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.VmExtensionPoliciesScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst new file mode 100644 index 000000000000..9218325d008a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`GlobalVmExtensionPoliciesTransport` is the ABC for all transports. +- public child `GlobalVmExtensionPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `GlobalVmExtensionPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseGlobalVmExtensionPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `GlobalVmExtensionPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py new file mode 100644 index 000000000000..6cecd5a5368a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import GlobalVmExtensionPoliciesTransport +from .rest import ( + GlobalVmExtensionPoliciesRestInterceptor, + GlobalVmExtensionPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[GlobalVmExtensionPoliciesTransport]] +_transport_registry["rest"] = GlobalVmExtensionPoliciesRestTransport + +__all__ = ( + "GlobalVmExtensionPoliciesTransport", + "GlobalVmExtensionPoliciesRestTransport", + "GlobalVmExtensionPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py new file mode 100644 index 000000000000..e99ec2e3a3cd --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py @@ -0,0 +1,189 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class GlobalVmExtensionPoliciesTransport(abc.ABC): + """Abstract transport class for GlobalVmExtensionPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListGlobalVmExtensionPoliciesRequest], + Union[ + compute.VmExtensionPolicyAggregatedListResponse, + Awaitable[compute.VmExtensionPolicyAggregatedListResponse], + ], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetGlobalVmExtensionPolicyRequest], + Union[ + compute.GlobalVmExtensionPolicy, Awaitable[compute.GlobalVmExtensionPolicy] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + +__all__ = ("GlobalVmExtensionPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py new file mode 100644 index 000000000000..ff5e96f8ed6b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py @@ -0,0 +1,625 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseGlobalVmExtensionPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class GlobalVmExtensionPoliciesRestInterceptor: + """Interceptor for GlobalVmExtensionPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the GlobalVmExtensionPoliciesRestTransport. + + .. code-block:: python + class MyCustomGlobalVmExtensionPoliciesInterceptor(GlobalVmExtensionPoliciesRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + transport = GlobalVmExtensionPoliciesRestTransport(interceptor=MyCustomGlobalVmExtensionPoliciesInterceptor()) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListGlobalVmExtensionPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.VmExtensionPolicyAggregatedListResponse + ) -> compute.VmExtensionPolicyAggregatedListResponse: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.VmExtensionPolicyAggregatedListResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.VmExtensionPolicyAggregatedListResponse, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetGlobalVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetGlobalVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.GlobalVmExtensionPolicy + ) -> compute.GlobalVmExtensionPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.GlobalVmExtensionPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GlobalVmExtensionPolicy, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class GlobalVmExtensionPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: GlobalVmExtensionPoliciesRestInterceptor + + +class GlobalVmExtensionPoliciesRestTransport( + _BaseGlobalVmExtensionPoliciesRestTransport +): + """REST backend synchronous transport for GlobalVmExtensionPolicies. + + The GlobalVmExtensionPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[GlobalVmExtensionPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or GlobalVmExtensionPoliciesRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicyAggregatedListResponse: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListGlobalVmExtensionPoliciesRequest): + The request object. A request message for + GlobalVmExtensionPolicies.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicyAggregatedListResponse: + Response for the aggregated list of + VM extension policies. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + GlobalVmExtensionPoliciesRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicyAggregatedListResponse() + pb_resp = compute.VmExtensionPolicyAggregatedListResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.VmExtensionPolicyAggregatedListResponse.to_json( + response + ) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetGlobalVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.GlobalVmExtensionPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetGlobalVmExtensionPolicyRequest): + The request object. A request message for + GlobalVmExtensionPolicies.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.GlobalVmExtensionPolicy: + Message describing + GlobalVmExtensionPolicy object. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.GlobalVmExtensionPolicy() + pb_resp = compute.GlobalVmExtensionPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.GlobalVmExtensionPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListGlobalVmExtensionPoliciesRequest], + compute.VmExtensionPolicyAggregatedListResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetGlobalVmExtensionPolicyRequest], compute.GlobalVmExtensionPolicy + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("GlobalVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py new file mode 100644 index 000000000000..3b84b14df071 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py @@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, GlobalVmExtensionPoliciesTransport + + +class _BaseGlobalVmExtensionPoliciesRestTransport(GlobalVmExtensionPoliciesTransport): + """Base REST backend transport for GlobalVmExtensionPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/vmExtensionPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListGlobalVmExtensionPoliciesRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetGlobalVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseGlobalVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py index d236715dab11..284c50c6d74d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py @@ -697,9 +697,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all HealthCheck resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1148,23 +1149,33 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) - \* - [Global](/compute/docs/reference/rest/beta/healthChecks) - These health check resources can be used for load - balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding - backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) + - [Global](/compute/docs/reference/rest/beta/healthChecks) + + These health check resources can be used for load + balancing and for autohealing VMs in a managed + instance group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type + of load balancer. For details about the type of + health check supported for each load balancer and + corresponding backend type, see Health checks + overview: Load balancer guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in + a MIG can be either regional or global. For more + information, see Set up an application health check + and autohealing. + + For more information, seeHealth checks overview. """ # Create or coerce a protobuf request object. @@ -1612,7 +1623,7 @@ def patch_unary( ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1746,7 +1757,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py index 49c90091ba5c..9514e722ba56 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py @@ -809,21 +809,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -974,23 +985,33 @@ def __call__( Returns: ~.compute.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - `Regional `__ - \* - `Global `__ + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - `Regional `__ + - `Global `__ + These health check resources can be used for load balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding + group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type of + load balancer. For details about the type of health + check supported for each load balancer and corresponding backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in a + MIG can be either regional or global. For more + information, see Set up an application health check and + autohealing. + + For more information, seeHealth checks overview. """ @@ -1136,21 +1157,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1453,21 +1485,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1776,21 +1819,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py index d3b38d841ef8..29388cc59f3d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py @@ -960,9 +960,10 @@ def deprecate_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets the deprecation status of an image. If an empty - request body is given, clears the deprecation status - instead. + r"""Sets the deprecation status of an image. + + If an empty request body is given, clears the + deprecation status instead. .. code-block:: python @@ -1091,9 +1092,10 @@ def deprecate( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets the deprecation status of an image. If an empty - request body is given, clears the deprecation status - instead. + r"""Sets the deprecation status of an image. + + If an empty request body is given, clears the + deprecation status instead. .. code-block:: python @@ -1298,10 +1300,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ # Create or coerce a protobuf request object. @@ -1369,7 +1372,7 @@ def get_from_family( ) -> compute.Image: r"""Returns the latest image that is part of an image family and is not deprecated. For more information on - image families, see Public image families documentation. + image families, seePublic image families documentation. .. code-block:: python @@ -1429,10 +1432,11 @@ def sample_get_from_family(): Returns: google.cloud.compute_v1beta.types.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ # Create or coerce a protobuf request object. @@ -1555,28 +1559,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1895,14 +1907,15 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves the list of custom images available to the - specified project. Custom images are images you create - that belong to your project. This method does not get - any images that belong to other projects, including - publicly-available images, like Debian 8. If you want to - get a list of publicly-available images, use this method - to make a request to the respective image project, such - as debian-cloud or windows-cloud. + r"""Retrieves the list of custom images + available to the specified project. Custom images are + images you create that belong to your project. This + method does not get any images that belong to other + projects, including publicly-available images, like + Debian 8. If you want to get a list of + publicly-available images, use this method to make a + request to the respective image project, such as + debian-cloud or windows-cloud. .. code-block:: python @@ -2373,28 +2386,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2468,7 +2489,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an image. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2604,7 +2625,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an image. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py index 6071e46c54ee..bd34c04c5eb5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py @@ -800,21 +800,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -962,21 +973,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1129,10 +1151,11 @@ def __call__( Returns: ~.compute.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ @@ -1275,10 +1298,11 @@ def __call__( Returns: ~.compute.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ @@ -1428,26 +1452,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1598,21 +1673,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1905,21 +1991,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2073,26 +2170,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2249,21 +2397,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py index c4c59c0d934f..a966437b1d7c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py @@ -776,9 +776,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -933,9 +933,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1115,9 +1115,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1272,9 +1272,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1469,8 +1469,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. resize_request (str): - The name of the resize request. Name - should conform to RFC1035 or be a + The name of the resize request. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``resize_request`` field @@ -1613,10 +1613,10 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located and - where the resize request will be - created. Name should conform to RFC1035. + The name of thezone where the managed + instance group is located and where the + resize request will be created. Name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1774,10 +1774,10 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located and - where the resize request will be - created. Name should conform to RFC1035. + The name of thezone where the managed + instance group is located and where the + resize request will be created. Name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1958,9 +1958,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py index fa0e8fcbde0e..44820c267f53 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py @@ -513,21 +513,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -679,21 +690,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1003,21 +1025,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py index 7e1ddde54752..fe19aead5697 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py @@ -717,18 +717,22 @@ def abandon_instances_unary( managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed - instance group. This method reduces the targetSize of - the managed instance group by the number of instances - that you abandon. This operation is marked as DONE when - the action is scheduled even if the instances have not - yet been removed from the group. You must separately - verify the status of the abandoning action with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. You can specify a maximum of 1000 instances - with this method per request. + instance group. This method reduces thetargetSize of the + managed instance group by the number of instances that + you abandon. This operation is marked asDONE when the + action is scheduled even if the instances have not yet + been removed from the group. You must separately verify + the status of the abandoning action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -769,8 +773,8 @@ def sample_abandon_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -886,18 +890,22 @@ def abandon_instances( managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed - instance group. This method reduces the targetSize of - the managed instance group by the number of instances - that you abandon. This operation is marked as DONE when - the action is scheduled even if the instances have not - yet been removed from the group. You must separately - verify the status of the abandoning action with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. You can specify a maximum of 1000 instances - with this method per request. + instance group. This method reduces thetargetSize of the + managed instance group by the number of instances that + you abandon. This operation is marked asDONE when the + action is scheduled even if the instances have not yet + been removed from the group. You must separately verify + the status of the abandoning action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -938,8 +946,8 @@ def sample_abandon_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1072,7 +1080,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of managed instance groups and groups them by - zone. To prevent failure, Google recommends that you set the + zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1243,9 +1253,9 @@ def sample_apply_updates_to_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. - Should conform to RFC1035. + The name of thezone + where the managed instance group is + located. Should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1406,9 +1416,9 @@ def sample_apply_updates_to_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. - Should conform to RFC1035. + The name of thezone + where the managed instance group is + located. Should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1553,11 +1563,11 @@ def create_instances_unary( ) -> compute.Operation: r"""Creates instances with per-instance configurations in this managed instance group. Instances are created using - the current instance template. The create instances - operation is marked DONE if the createInstances request + the current instance template. Thecreate instances + operation is marked DONE if thecreateInstances request is successful. The underlying actions take additional - time. You must separately verify the status of the - creating or actions with the listmanagedinstances + time. You must separately verify the status of + thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1599,9 +1609,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1715,11 +1725,11 @@ def create_instances( ) -> extended_operation.ExtendedOperation: r"""Creates instances with per-instance configurations in this managed instance group. Instances are created using - the current instance template. The create instances - operation is marked DONE if the createInstances request + the current instance template. Thecreate instances + operation is marked DONE if thecreateInstances request is successful. The underlying actions take additional - time. You must separately verify the status of the - creating or actions with the listmanagedinstances + time. You must separately verify the status of + thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1761,9 +1771,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1941,8 +1951,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2081,8 +2091,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2208,16 +2218,20 @@ def delete_instances_unary( r"""Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. This operation is marked as DONE when the - action is scheduled even if the instances are still - being deleted. You must separately verify the status of - the deleting action with the listmanagedinstances - method. If the group is part of a backend service that - has enabled connection draining, it can take up to 60 - seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. This operation is marked as DONE when the action + is scheduled even if the instances are still being + deleted. You must separately verify the status of the + deleting action with thelistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -2260,8 +2274,8 @@ def sample_delete_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2376,16 +2390,20 @@ def delete_instances( r"""Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. This operation is marked as DONE when the - action is scheduled even if the instances are still - being deleted. You must separately verify the status of - the deleting action with the listmanagedinstances - method. If the group is part of a backend service that - has enabled connection draining, it can take up to 60 - seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. This operation is marked as DONE when the action + is scheduled even if the instances are still being + deleted. You must separately verify the status of the + deleting action with thelistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -2428,8 +2446,8 @@ def sample_delete_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2608,9 +2626,10 @@ def sample_delete_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2773,9 +2792,10 @@ def sample_delete_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2958,8 +2978,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2982,14 +3002,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ # Create or coerce a protobuf request object. @@ -3048,6 +3071,158 @@ def sample_get(): # Done; return the response. return response + def get_available_accelerator_topologies( + self, + request: Optional[ + Union[ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + dict, + ] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + resource_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + r"""Returns information about available accelerator + topologies for a given MIG. + + .. 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 compute_v1beta + + def sample_get_available_accelerator_topologies(): + # Create a client + client = compute_v1beta.InstanceGroupManagersClient() + + # Initialize request argument(s) + request = compute_v1beta.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + project="project_value", + resource_id="resource_id_value", + zone="zone_value", + ) + + # Make the request + response = client.get_available_accelerator_topologies(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, dict]): + The request object. A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. + See the method description for details. + project (str): + Required. Project ID for this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Required. The name of thezone where + the managed instance group is located. + Name should conform to RFC1035. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource_id (str): + Required. The name of the managed + instance group. It should conform to + RFC1035. + + This corresponds to the ``resource_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + + """ + # 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. + flattened_params = [project, zone, resource_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + ): + request = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + request + ) + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if resource_id is not None: + request.resource_id = resource_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.get_available_accelerator_topologies + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("resource_id", request.resource_id), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def insert_unary( self, request: Optional[ @@ -3064,14 +3239,16 @@ def insert_unary( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - managed instance group can have up to 1000 VM instances - per group. Please contact Cloud Support if you need an - increase in this limit. + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A managed instance group can have up to 1000 VM + instances per group. Please contact Cloud Support if you + need an increase in this limit. .. code-block:: python @@ -3111,8 +3288,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3209,14 +3387,16 @@ def insert( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - managed instance group can have up to 1000 VM instances - per group. Please contact Cloud Support if you need an - increase in this limit. + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A managed instance group can have up to 1000 VM + instances per group. Please contact Cloud Support if you + need an increase in this limit. .. code-block:: python @@ -3256,8 +3436,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3415,8 +3596,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3558,9 +3739,9 @@ def sample_list_errors(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone where the managed + instance group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3719,8 +3900,8 @@ def sample_list_managed_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3873,9 +4054,9 @@ def sample_list_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3988,19 +4169,22 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listManagedInstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with + thelistManagedInstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4041,8 +4225,9 @@ def sample_patch(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone where + you want to create the managed instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4151,19 +4336,22 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listManagedInstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with + thelistManagedInstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4204,8 +4392,9 @@ def sample_patch(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone where + you want to create the managed instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4386,9 +4575,9 @@ def sample_patch_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4553,9 +4742,9 @@ def sample_patch_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4707,12 +4896,16 @@ def recreate_instances_unary( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4755,8 +4948,8 @@ def sample_recreate_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4876,12 +5069,16 @@ def recreate_instances( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4924,8 +5121,8 @@ def sample_recreate_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5065,23 +5262,32 @@ def resize_unary( r"""Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the - group deletes instances. The resize operation is marked - DONE when the resize actions are scheduled even if the - group has not yet added or deleted any instances. You - must separately verify the status of the creating or - deleting actions with the listmanagedinstances method. + group deletes instances. The resize operation is + markedDONE when the resize actions are scheduled even if + the group has not yet added or deleted any instances. + You must separately verify the status of the creating or + deleting + actions with thelistmanagedinstances + method. + When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the - selection including: + The status of the VM instance. + - The health of the VM instance. + The instance template - version the VM is based on. + For regional managed - instance groups, the location of the VM instance. This - list is subject to change. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + selection including: + + + The status of the VM instance. + + The health of the VM instance. + + The instance template version the VM is based on. + + For regional managed instance groups, the location of + the VM instance. + + This list is subject to change. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5123,8 +5329,8 @@ def sample_resize(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5236,23 +5442,32 @@ def resize( r"""Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the - group deletes instances. The resize operation is marked - DONE when the resize actions are scheduled even if the - group has not yet added or deleted any instances. You - must separately verify the status of the creating or - deleting actions with the listmanagedinstances method. + group deletes instances. The resize operation is + markedDONE when the resize actions are scheduled even if + the group has not yet added or deleted any instances. + You must separately verify the status of the creating or + deleting + actions with thelistmanagedinstances + method. + When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the - selection including: + The status of the VM instance. + - The health of the VM instance. + The instance template - version the VM is based on. + For regional managed - instance groups, the location of the VM instance. This - list is subject to change. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + selection including: + + + The status of the VM instance. + + The health of the VM instance. + + The instance template version the VM is based on. + + For regional managed instance groups, the location of + the VM instance. + + This list is subject to change. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5294,8 +5509,8 @@ def sample_resize(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5433,20 +5648,25 @@ def resize_advanced_unary( ) -> compute.Operation: r"""Resizes the managed instance group with advanced configuration options like disabling creation retries. - This is an extended version of the resize method. If you - increase the size of the instance group, the group - creates new instances using the current instance + This is an extended version of theresize method. + + If you increase the size of the instance group, the + group creates new instances using the current instance template. If you decrease the size, the group deletes - instances. The resize operation is marked DONE when the + instances. The resize operation is markedDONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately - verify the status of the creating, - creatingWithoutRetries, or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + verify the status of the + creating,creatingWithoutRetries, or deleting actions + with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5487,8 +5707,8 @@ def sample_resize_advanced(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5602,20 +5822,25 @@ def resize_advanced( ) -> extended_operation.ExtendedOperation: r"""Resizes the managed instance group with advanced configuration options like disabling creation retries. - This is an extended version of the resize method. If you - increase the size of the instance group, the group - creates new instances using the current instance + This is an extended version of theresize method. + + If you increase the size of the instance group, the + group creates new instances using the current instance template. If you decrease the size, the group deletes - instances. The resize operation is marked DONE when the + instances. The resize operation is markedDONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately - verify the status of the creating, - creatingWithoutRetries, or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + verify the status of the + creating,creatingWithoutRetries, or deleting actions + with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5656,8 +5881,8 @@ def sample_resize_advanced(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5795,22 +6020,26 @@ def resume_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -5851,8 +6080,8 @@ def sample_resume_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5965,22 +6194,26 @@ def resume_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -6021,8 +6254,8 @@ def sample_resume_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6161,7 +6394,7 @@ def set_auto_healing_policies_unary( ) -> compute.Operation: r"""Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use instanceGroupManagers.patch instead. + UseinstanceGroupManagers.patch instead. .. code-block:: python @@ -6202,8 +6435,8 @@ def sample_set_auto_healing_policies(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6321,7 +6554,7 @@ def set_auto_healing_policies( ) -> extended_operation.ExtendedOperation: r"""Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use instanceGroupManagers.patch instead. + UseinstanceGroupManagers.patch instead. .. code-block:: python @@ -6362,8 +6595,8 @@ def sample_set_auto_healing_policies(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6507,8 +6740,8 @@ def set_instance_template_unary( r"""Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run - recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE. + recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE. .. code-block:: python @@ -6549,8 +6782,8 @@ def sample_set_instance_template(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6670,8 +6903,8 @@ def set_instance_template( r"""Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run - recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE. + recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE. .. code-block:: python @@ -6712,8 +6945,8 @@ def sample_set_instance_template(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6858,7 +7091,7 @@ def set_target_pools_unary( r"""Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the - managed instance group. This operation is marked DONE + managed instance group. This operation is markedDONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the @@ -6903,8 +7136,8 @@ def sample_set_target_pools(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7019,7 +7252,7 @@ def set_target_pools( r"""Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the - managed instance group. This operation is marked DONE + managed instance group. This operation is markedDONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the @@ -7064,8 +7297,8 @@ def sample_set_target_pools(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7203,22 +7436,26 @@ def start_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7259,8 +7496,8 @@ def sample_start_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7373,22 +7610,26 @@ def start_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7429,8 +7670,8 @@ def sample_start_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7570,27 +7811,36 @@ def stop_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7631,8 +7881,8 @@ def sample_stop_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7747,27 +7997,36 @@ def stop_instances( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7808,8 +8067,8 @@ def sample_stop_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7949,29 +8208,36 @@ def suspend_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8012,8 +8278,8 @@ def sample_suspend_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8128,29 +8394,36 @@ def suspend_instances( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8191,8 +8464,8 @@ def sample_suspend_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8478,17 +8751,19 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listManagedInstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistManagedInstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8529,8 +8804,9 @@ def sample_update(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8641,17 +8917,19 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listManagedInstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistManagedInstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8692,8 +8970,9 @@ def sample_update(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8874,9 +9153,9 @@ def sample_update_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -9041,9 +9320,9 @@ def sample_update_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py index 7aa89f143fc1..6e6cd4cc5b7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py @@ -178,6 +178,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_available_accelerator_topologies: gapic_v1.method.wrap_method( + self.get_available_accelerator_topologies, + default_timeout=None, + client_info=client_info, + ), self.insert: gapic_v1.method.wrap_method( self.insert, default_timeout=None, @@ -364,6 +369,20 @@ def get( ]: raise NotImplementedError() + @property + def get_available_accelerator_topologies( + self, + ) -> Callable[ + [compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest], + Union[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + Awaitable[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse + ], + ], + ]: + raise NotImplementedError() + @property def insert( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py index 00bdf5251e23..c8642f42bbc1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py @@ -136,6 +136,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_available_accelerator_topologies(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_available_accelerator_topologies(self, response): + logging.log(f"Received response: {response}") + return response + def pre_insert(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -688,6 +696,59 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_available_accelerator_topologies( + self, + request: compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_available_accelerator_topologies + + Override in a subclass to manipulate the request or metadata + before they are sent to the InstanceGroupManagers server. + """ + return request, metadata + + def post_get_available_accelerator_topologies( + self, + response: compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + """Post-rpc interceptor for get_available_accelerator_topologies + + DEPRECATED. Please use the `post_get_available_accelerator_topologies_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the InstanceGroupManagers server but before + it is returned to user code. This `post_get_available_accelerator_topologies` interceptor runs + before the `post_get_available_accelerator_topologies_with_metadata` interceptor. + """ + return response + + def post_get_available_accelerator_topologies_with_metadata( + self, + response: compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for get_available_accelerator_topologies + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the InstanceGroupManagers server but before it is returned to user code. + + We recommend only using this `post_get_available_accelerator_topologies_with_metadata` + interceptor in new development instead of the `post_get_available_accelerator_topologies` interceptor. + When both interceptors are used, this `post_get_available_accelerator_topologies_with_metadata` interceptor runs after the + `post_get_available_accelerator_topologies` interceptor. The (possibly modified) response returned by + `post_get_available_accelerator_topologies` will be passed to + `post_get_available_accelerator_topologies_with_metadata`. + """ + return response, metadata + def pre_insert( self, request: compute.InsertInstanceGroupManagerRequest, @@ -1806,21 +1867,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2130,21 +2202,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2302,21 +2385,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2475,21 +2569,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2640,21 +2745,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2815,21 +2931,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2986,14 +3113,17 @@ def __call__( Returns: ~.compute.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ @@ -3087,6 +3217,170 @@ def __call__( ) return resp + class _GetAvailableAcceleratorTopologies( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies, + InstanceGroupManagersRestStub, + ): + def __hash__(self): + return hash( + "InstanceGroupManagersRestTransport.GetAvailableAcceleratorTopologies" + ) + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + r"""Call the get available accelerator + topologies method over HTTP. + + Args: + request (~.compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest): + The request object. A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + + """ + + http_options = ( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_http_options() + ) + + ( + request, + metadata, + ) = self._interceptor.pre_get_available_accelerator_topologies( + request, metadata + ) + transcoded_request = _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.InstanceGroupManagersClient.GetAvailableAcceleratorTopologies", + extra={ + "serviceName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "rpcName": "GetAvailableAcceleratorTopologies", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = InstanceGroupManagersRestTransport._GetAvailableAcceleratorTopologies._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + pb_resp = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + resp + ) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_available_accelerator_topologies(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + ( + resp, + _, + ) = self._interceptor.post_get_available_accelerator_topologies_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.InstanceGroupManagersClient.get_available_accelerator_topologies", + extra={ + "serviceName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "rpcName": "GetAvailableAcceleratorTopologies", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _Insert( _BaseInstanceGroupManagersRestTransport._BaseInsert, InstanceGroupManagersRestStub, @@ -3142,21 +3436,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3915,21 +4220,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4086,21 +4402,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4258,21 +4585,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4431,21 +4769,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4596,21 +4945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4766,21 +5126,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4940,21 +5311,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5112,21 +5494,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5286,21 +5679,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5458,21 +5862,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5628,21 +6043,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5798,21 +6224,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6129,21 +6566,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6300,21 +6748,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6496,6 +6955,17 @@ def get( # In C++ this would require a dynamic_cast return self._Get(self._session, self._host, self._interceptor) # type: ignore + @property + def get_available_accelerator_topologies( + self, + ) -> Callable[ + [compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest], + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetAvailableAcceleratorTopologies(self._session, self._host, self._interceptor) # type: ignore + @property def insert( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py index d4ced53d4543..2b75eb34d1ad 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py @@ -509,6 +509,56 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetAvailableAcceleratorTopologies: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/instanceGroupManagers/{resource_id}/getAvailableAcceleratorTopologies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest.pb( + request + ) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseInsert: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py index 23530bd688f2..e11025069bc0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py @@ -705,9 +705,9 @@ def add_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Adds a list of instances to the specified instance - group. All of the instances in the instance group must - be in the same network/subnetwork. Read Adding instances - for more information. + group. All of the instances in the instance group must + be in the same network/subnetwork. Read + Adding instances for more information. .. code-block:: python @@ -748,8 +748,8 @@ def sample_add_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -860,9 +860,9 @@ def add_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a list of instances to the specified instance - group. All of the instances in the instance group must - be in the same network/subnetwork. Read Adding instances - for more information. + group. All of the instances in the instance group must + be in the same network/subnetwork. Read + Adding instances for more information. .. code-block:: python @@ -903,8 +903,8 @@ def sample_add_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1036,8 +1036,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves the list of instance groups and sorts them by zone. To - prevent failure, Google recommends that you set the + r"""Retrieves the list of instance groups and sorts them by zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1162,8 +1163,8 @@ def delete_unary( ) -> compute.Operation: r"""Deletes the specified instance group. The instances in the group are not deleted. Note that instance group - must not belong to a backend service. Read Deleting an - instance group for more information. + must not belong to a backend service. Read + Deleting an instance group for more information. .. code-block:: python @@ -1204,8 +1205,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1300,8 +1301,8 @@ def delete( ) -> extended_operation.ExtendedOperation: r"""Deletes the specified instance group. The instances in the group are not deleted. Note that instance group - must not belong to a backend service. Read Deleting an - instance group for more information. + must not belong to a backend service. Read + Deleting an instance group for more information. .. code-block:: python @@ -1342,8 +1343,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1463,8 +1464,10 @@ def get( ) -> compute.InstanceGroup: r"""Returns the specified zonal instance group. Get a list of available zonal instance groups by making a - list() request. For managed instance groups, use the - instanceGroupManagers or regionInstanceGroupManagers + list() request. + + For managed instance groups, use + theinstanceGroupManagers or regionInstanceGroupManagers methods instead. .. code-block:: python @@ -1506,8 +1509,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1528,19 +1531,28 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ # Create or coerce a protobuf request object. @@ -1651,8 +1663,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the instance group. + The name of the zone + where you want to create the instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1783,8 +1796,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the instance group. + The name of the zone + where you want to create the instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1899,9 +1913,11 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""Retrieves the list of zonal instance group resources - contained within the specified zone. For managed - instance groups, use the instanceGroupManagers or - regionInstanceGroupManagers methods instead. + contained within the specified zone. + + For managed instance groups, use + theinstanceGroupManagers or regionInstanceGroupManagers + methods instead. .. code-block:: python @@ -1942,8 +1958,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of thezone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2090,8 +2106,8 @@ def sample_list_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2217,8 +2233,10 @@ def remove_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Removes one or more instances from the specified - instance group, but does not delete those instances. If - the group is part of a backend service that has enabled + instance group, but does not delete those instances. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. @@ -2262,8 +2280,8 @@ def sample_remove_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2376,8 +2394,10 @@ def remove_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes one or more instances from the specified - instance group, but does not delete those instances. If - the group is part of a backend service that has enabled + instance group, but does not delete those instances. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. @@ -2421,8 +2441,8 @@ def sample_remove_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2601,8 +2621,8 @@ def sample_set_named_ports(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2756,8 +2776,8 @@ def sample_set_named_ports(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py index 4c27d1860a11..17b3d11ecdb9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py @@ -784,21 +784,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1098,21 +1109,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1264,19 +1286,28 @@ def __call__( Returns: ~.compute.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ @@ -1422,21 +1453,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1895,21 +1937,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2066,21 +2119,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py index 5a29cb1542c6..76e16e8bb6b9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py @@ -485,21 +485,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py index 03816e1011a5..70b37cd2e95b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py @@ -707,8 +707,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all InstanceTemplates resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1164,19 +1165,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - [Global](/compute/docs/reference/rest/beta/instanceTemplates) - \* - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) - You can reuse a global instance template in different - regions whereas you can use a regional instance template - in a specified region only. If you want to reduce - cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - [Global](/compute/docs/reference/rest/beta/instanceTemplates) + - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) + + You can reuse a global instance template in different + regions whereas you can use a regional instance + template in a specified region only. If you want to + reduce cross-region dependency or achieve data + residency, use a regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ # Create or coerce a protobuf request object. @@ -1301,28 +1308,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1842,28 +1857,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py index 9238e620ad31..d6855d794c8d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py @@ -820,21 +820,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -985,19 +996,25 @@ def __call__( Returns: ~.compute.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - `Global `__ - \* - `Regional `__ + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - `Global `__ + - `Regional `__ + You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ @@ -1147,26 +1164,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1316,21 +1384,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1640,26 +1719,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py index d2de2fdf5125..b191b8d6fb19 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py @@ -1690,11 +1690,14 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all of the instances in your - project across all regions and zones. The performance of this - method degrades when a filter is specified on a project that has - a very large number of instances. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + project across all regions and zones. + + The performance of this method degrades when a filter is + specified on a project that has a very large number of + instances. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1820,8 +1823,8 @@ def attach_disk_unary( r"""Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the - same time. For more information, read Adding a - persistent disk to your instance. + same time. For more information, readAdding a persistent + disk to your instance. .. code-block:: python @@ -1965,8 +1968,8 @@ def attach_disk( r"""Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the - same time. For more information, read Adding a - persistent disk to your instance. + same time. For more information, readAdding a persistent + disk to your instance. .. code-block:: python @@ -2134,8 +2137,8 @@ def bulk_insert_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Creates multiple instances. Count specifies the - number of instances to create. For more information, see - About bulk creation of VMs. + number of instances to create. For more information, + seeAbout bulk creation of VMs. .. code-block:: python @@ -2271,8 +2274,8 @@ def bulk_insert( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates multiple instances. Count specifies the - number of instances to create. For more information, see - About bulk creation of VMs. + number of instances to create. For more information, + seeAbout bulk creation of VMs. .. code-block:: python @@ -2431,7 +2434,7 @@ def delete_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes the specified Instance resource. For more - information, see Deleting an instance. + information, seeDeleting an instance. .. code-block:: python @@ -2567,7 +2570,7 @@ def delete( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Instance resource. For more - information, see Deleting an instance. + information, seeDeleting an instance. .. code-block:: python @@ -3068,10 +3071,12 @@ def delete_network_interface_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes one dynamic network interface from an active instance. - InstancesDeleteNetworkInterfaceRequest indicates: - instance - from which to delete, using project+zone+resource_id fields; - - dynamic network interface to be deleted, using - network_interface_name field; + InstancesDeleteNetworkInterfaceRequest indicates: + + - instance from which to delete, using project+zone+resource_id + fields; + - dynamic network interface to be deleted, using + network_interface_name field; .. code-block:: python @@ -3222,10 +3227,12 @@ def delete_network_interface( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes one dynamic network interface from an active instance. - InstancesDeleteNetworkInterfaceRequest indicates: - instance - from which to delete, using project+zone+resource_id fields; - - dynamic network interface to be deleted, using - network_interface_name field; + InstancesDeleteNetworkInterfaceRequest indicates: + + - instance from which to delete, using project+zone+resource_id + fields; + - dynamic network interface to be deleted, using + network_interface_name field; .. code-block:: python @@ -3777,10 +3784,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Instance: - Represents an Instance resource. An - instance is a virtual machine that is + Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud Platform. For - more information, read Virtual Machine + more information, readVirtual Machine Instances. """ @@ -4198,28 +4206,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4356,9 +4372,10 @@ def sample_get_partner_metadata(): Returns: google.cloud.compute_v1beta.types.PartnerMetadata: - Model definition of partner_metadata field. To be used - in dedicated Partner Metadata methods and to be inlined - in the Instance and InstanceTemplate resources. + Model definition of partner_metadata field. + To be used in dedicated Partner Metadata methods and + to be inlined in the Instance and InstanceTemplate + resources. """ # Create or coerce a protobuf request object. @@ -5257,8 +5274,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves the list of instances contained within the - specified zone. + r"""Retrieves the list of instances contained within + the specified zone. .. code-block:: python @@ -5400,8 +5417,8 @@ def list_referrers( instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. - For more information, read Viewing referrers to VM - instances. + For more information, readViewing + referrers to VM instances. .. code-block:: python @@ -6833,7 +6850,7 @@ def reset_unary( ) -> compute.Operation: r"""Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more - information, see Resetting an instance. + information, seeResetting an instance. .. code-block:: python @@ -6970,7 +6987,7 @@ def reset( ) -> extended_operation.ExtendedOperation: r"""Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more - information, see Resetting an instance. + information, seeResetting an instance. .. code-block:: python @@ -7130,8 +7147,8 @@ def resume_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Resumes an instance that was suspended using the - instances().suspend method. + r"""Resumes an instance that was suspended using + theinstances().suspend method. .. code-block:: python @@ -7266,8 +7283,8 @@ def resume( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Resumes an instance that was suspended using the - instances().suspend method. + r"""Resumes an instance that was suspended using + theinstances().suspend method. .. code-block:: python @@ -8278,28 +8295,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -8376,8 +8401,8 @@ def set_labels_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets labels on an instance. To learn more about - labels, read the Labeling Resources documentation. + r"""Sets labels on an instance. To learn more about + labels, read theLabeling Resources documentation. .. code-block:: python @@ -8529,8 +8554,8 @@ def set_labels( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets labels on an instance. To learn more about - labels, read the Labeling Resources documentation. + r"""Sets labels on an instance. To learn more about + labels, read theLabeling Resources documentation. .. code-block:: python @@ -9687,9 +9712,9 @@ def set_min_cpu_platform_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Changes the minimum CPU platform that this instance - should use. This method can only be called on a stopped - instance. For more information, read Specifying a - Minimum CPU Platform. + should use. This method can only + be called on a stopped instance. For more information, + readSpecifying a Minimum CPU Platform. .. code-block:: python @@ -9842,9 +9867,9 @@ def set_min_cpu_platform( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the minimum CPU platform that this instance - should use. This method can only be called on a stopped - instance. For more information, read Specifying a - Minimum CPU Platform. + should use. This method can only + be called on a stopped instance. For more information, + readSpecifying a Minimum CPU Platform. .. code-block:: python @@ -10345,11 +10370,11 @@ def set_scheduling_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets an instance's scheduling options. You can only call this - method on a stopped instance, that is, a VM instance that is in - a ``TERMINATED`` state. See Instance Life Cycle for more + method on astopped instance, that is, a VM instance that is in a + ``TERMINATED`` state. SeeInstance Life Cycle for more information on the possible instance states. For more - information about setting scheduling options for a VM, see Set - VM host maintenance policy. + information about setting scheduling options for a VM, seeSet VM + host maintenance policy. .. code-block:: python @@ -10491,11 +10516,11 @@ def set_scheduling( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets an instance's scheduling options. You can only call this - method on a stopped instance, that is, a VM instance that is in - a ``TERMINATED`` state. See Instance Life Cycle for more + method on astopped instance, that is, a VM instance that is in a + ``TERMINATED`` state. SeeInstance Life Cycle for more information on the possible instance states. For more - information about setting scheduling options for a VM, see Set - VM host maintenance policy. + information about setting scheduling options for a VM, seeSet VM + host maintenance policy. .. code-block:: python @@ -10664,7 +10689,7 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified instance. For more information, see Google + specified instance. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -10819,7 +10844,7 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified instance. For more information, see Google + specified instance. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -10999,8 +11024,8 @@ def set_service_account_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the service account on the instance. For more - information, read Changing the service account and - access scopes for an instance. + information, readChanging + the service account and access scopes for an instance. .. code-block:: python @@ -11153,8 +11178,8 @@ def set_service_account( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the service account on the instance. For more - information, read Changing the service account and - access scopes for an instance. + information, readChanging + the service account and access scopes for an instance. .. code-block:: python @@ -12019,8 +12044,9 @@ def set_tags_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets network tags for the specified instance to the - data included in the request. + r"""Sets network tags + for the specified instance to the data included in the + request. .. code-block:: python @@ -12163,8 +12189,9 @@ def set_tags( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets network tags for the specified instance to the - data included in the request. + r"""Sets network tags + for the specified instance to the data included in the + request. .. code-block:: python @@ -12636,9 +12663,9 @@ def start_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -12773,9 +12800,9 @@ def start( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -12940,9 +12967,9 @@ def start_with_encryption_key_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -13098,9 +13125,9 @@ def start_with_encryption_key( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -13282,7 +13309,7 @@ def stop_unary( they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For - more information, see Stopping an instance. + more information, seeStopping an instance. .. code-block:: python @@ -13422,7 +13449,7 @@ def stop( they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For - more information, see Stopping an instance. + more information, seeStopping an instance. .. code-block:: python @@ -13589,7 +13616,8 @@ def suspend_unary( charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more - information, see Suspending and resuming an instance. + information, see + Suspending and resuming an instance. .. code-block:: python @@ -13732,7 +13760,8 @@ def suspend( charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more - information, see Suspending and resuming an instance. + information, see + Suspending and resuming an instance. .. code-block:: python @@ -14363,8 +14392,9 @@ def update_access_config_unary( ) -> compute.Operation: r"""Updates the specified access config from an instance's network interface with the data included in - the request. This method supports PATCH semantics and - uses the JSON merge patch format and processing rules. + the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -14526,8 +14556,9 @@ def update_access_config( ) -> extended_operation.ExtendedOperation: r"""Updates the specified access config from an instance's network interface with the data included in - the request. This method supports PATCH semantics and - uses the JSON merge patch format and processing rules. + the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -14713,7 +14744,7 @@ def update_display_device_unary( ) -> compute.Operation: r"""Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -14861,7 +14892,7 @@ def update_display_device( ) -> extended_operation.ExtendedOperation: r"""Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15037,9 +15068,9 @@ def update_network_interface_unary( can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP - ranges. See Migrating a VM between networks for - instructions on migrating an interface. This method - follows PATCH semantics. + ranges. See Migrating + a VM between networks for instructions on migrating an + interface. This method follows PATCH semantics. .. code-block:: python @@ -15203,9 +15234,9 @@ def update_network_interface( can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP - ranges. See Migrating a VM between networks for - instructions on migrating an interface. This method - follows PATCH semantics. + ranges. See Migrating + a VM between networks for instructions on migrating an + interface. This method follows PATCH semantics. .. code-block:: python @@ -15393,7 +15424,7 @@ def update_shielded_instance_config_unary( ) -> compute.Operation: r"""Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15547,7 +15578,7 @@ def update_shielded_instance_config( ) -> extended_operation.ExtendedOperation: r"""Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15724,7 +15755,7 @@ def update_shielded_vm_config_unary( ) -> compute.Operation: r"""Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15874,7 +15905,7 @@ def update_shielded_vm_config( ) -> extended_operation.ExtendedOperation: r"""Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py index 09c1ee231378..a12c958746fc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py @@ -3331,21 +3331,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3506,21 +3517,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3677,21 +3699,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3996,21 +4029,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4167,21 +4211,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4337,21 +4392,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4502,21 +4568,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4667,21 +4744,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4830,21 +4918,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4994,10 +5093,11 @@ def __call__( Returns: ~.compute.Instance: - Represents an Instance resource. An - instance is a virtual machine that is + Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud Platform. For - more information, read Virtual Machine + more information, readVirtual Machine Instances. """ @@ -5442,26 +5542,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -6366,21 +6517,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6830,21 +6992,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7000,21 +7173,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7166,21 +7350,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7337,21 +7532,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7505,21 +7711,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7669,21 +7886,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7994,21 +8222,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8159,21 +8398,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8326,26 +8576,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -8502,21 +8803,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8675,21 +8987,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8846,21 +9169,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9021,21 +9355,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9194,21 +9539,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9363,21 +9719,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9534,21 +9901,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9709,21 +10087,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9880,21 +10269,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10053,21 +10453,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10231,21 +10642,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10405,21 +10827,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10576,21 +11009,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10739,21 +11183,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10905,21 +11360,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11072,21 +11538,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11231,21 +11708,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11549,21 +12037,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11720,21 +12219,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11891,21 +12401,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12062,21 +12583,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12234,21 +12766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12410,21 +12953,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py index 2606ef23379b..dab7c8f5eabb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py @@ -704,8 +704,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of instantSnapshots. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of instantSnapshots. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -834,7 +835,9 @@ def delete_unary( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -976,7 +979,9 @@ def delete( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -1203,8 +1208,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ # Create or coerce a protobuf request object. @@ -1341,28 +1347,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1927,28 +1941,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py index 18b88bbfd1e1..aa8602d47a3b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py @@ -871,21 +871,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1037,8 +1048,9 @@ def __call__( Returns: ~.compute.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ @@ -1188,26 +1200,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1357,21 +1420,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1681,26 +1755,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1855,21 +1980,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py index 441f332cb099..04a8ef03ec0b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py @@ -1190,28 +1190,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1813,7 +1821,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified InterconnectAttachmentGroup resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1961,7 +1969,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified InterconnectAttachmentGroup resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -2193,28 +2201,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py index 1457cd56cac7..7fb3997b7d4e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py @@ -739,21 +739,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1055,26 +1066,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1386,21 +1448,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1705,21 +1778,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1876,26 +1960,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py index 81378cad6d74..78205a245aa3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py @@ -710,8 +710,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of interconnect attachments. To - prevent failure, Google recommends that you set the + r"""Retrieves an aggregated list of interconnect attachments. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1194,13 +1195,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectAttachment: Represents an Interconnect Attachment - (VLAN) resource. You can use - Interconnect attachments (VLANS) to - connect your Virtual Private Cloud - networks to your on-premises networks - through an Interconnect. For more - information, read Creating VLAN - Attachments. + (VLAN) resource. + You can use Interconnect attachments + (VLANS) to connect your Virtual Private + Cloud networks to your on-premises + networks through an Interconnect. For + more information, read + Creating VLAN Attachments. """ # Create or coerce a protobuf request object. @@ -1626,9 +1627,11 @@ def sample_list(): google.cloud.compute_v1beta.services.interconnect_attachments.pagers.ListPager: Response to the list request, and contains a list of interconnect - attachments. Iterating over this object - will yield results and resolve - additional pages automatically. + attachments. + + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1712,9 +1715,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified interconnect attachment with - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1869,9 +1872,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified interconnect attachment with - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2051,8 +2054,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an InterconnectAttachment. To - learn more about labels, read the Labeling Resources - documentation. + learn more about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -2205,8 +2208,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an InterconnectAttachment. To - learn more about labels, read the Labeling Resources - documentation. + learn more about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py index 5c6459a30e39..90bda28a9121 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py @@ -830,21 +830,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -995,13 +1006,13 @@ def __call__( Returns: ~.compute.InterconnectAttachment: Represents an Interconnect Attachment - (VLAN) resource. You can use - Interconnect attachments (VLANS) to - connect your Virtual Private Cloud - networks to your on-premises networks - through an Interconnect. For more - information, read Creating VLAN - Attachments. + (VLAN) resource. + You can use Interconnect attachments + (VLANS) to connect your Virtual Private + Cloud networks to your on-premises + networks through an Interconnect. For + more information, read + Creating VLAN Attachments. """ @@ -1148,21 +1159,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1468,21 +1490,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1638,21 +1671,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py index dab2e7baa524..2ff663b71e1c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py @@ -1469,28 +1469,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2066,8 +2074,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified InterconnectGroup resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2200,8 +2208,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified InterconnectGroup resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2422,28 +2430,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py index eef74c148399..19ada5c7c71d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py @@ -785,21 +785,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -953,21 +964,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1271,26 +1293,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1597,21 +1670,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1920,21 +2004,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2097,26 +2192,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py index a8090ad3fb20..9b465632e6e6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py @@ -763,12 +763,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectLocation: Represents an Interconnect Attachment - (VLAN) Location resource. You can use - this resource to find location details - about an Interconnect attachment (VLAN). - For more information about interconnect - attachments, read Creating VLAN - Attachments. + (VLAN) Location resource. + You can use this resource to find + location details about an Interconnect + attachment (VLAN). For more information + about interconnect attachments, read + Creating VLAN Attachments. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py index 89e288917d0c..f9b412e84534 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py @@ -339,12 +339,12 @@ def __call__( Returns: ~.compute.InterconnectLocation: Represents an Interconnect Attachment - (VLAN) Location resource. You can use - this resource to find location details - about an Interconnect attachment (VLAN). - For more information about interconnect - attachments, read Creating VLAN - Attachments. + (VLAN) Location resource. + You can use this resource to find + location details about an Interconnect + attachment (VLAN). For more information + about interconnect attachments, read + Creating VLAN Attachments. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py index a98bea0070ed..f1f1cee4474f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py @@ -714,7 +714,7 @@ def get( ) -> compute.InterconnectRemoteLocation: r"""Returns the details for the specified interconnect remote location. Gets a list of available interconnect - remote locations by making a list() request. + remote locations by making alist() request. .. code-block:: python @@ -771,10 +771,10 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect - Remote Location resource. You can use - this resource to find remote location - details about an Interconnect attachment - (VLAN). + Remote Location resource. + You can use this resource to find remote + location details about an Interconnect + attachment (VLAN). """ # Create or coerce a protobuf request object. @@ -896,9 +896,11 @@ def sample_list(): google.cloud.compute_v1beta.services.interconnect_remote_locations.pagers.ListPager: Response to the list request, and contains a list of interconnect remote - locations. Iterating over this object - will yield results and resolve - additional pages automatically. + locations. + + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py index c5b7e1573fef..d1d7fa94bcd3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py @@ -345,10 +345,10 @@ def __call__( Returns: ~.compute.InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect - Remote Location resource. You can use - this resource to find remote location - details about an Interconnect attachment - (VLAN). + Remote Location resource. + You can use this resource to find remote + location details about an Interconnect + attachment (VLAN). """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py index 4aaf9220579c..12ffe7e5b3c2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py @@ -1020,6 +1020,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Interconnect: Represents an Interconnect resource. + An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. @@ -1093,12 +1094,15 @@ def get_diagnostics( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.InterconnectsGetDiagnosticsResponse: r"""Returns the interconnectDiagnostics for the specified - Interconnect. In the event of a global outage, do not - use this API to make decisions about where to redirect - your network traffic. Unlike a VLAN attachment, which is - regional, a Cloud Interconnect connection is a global - resource. A global outage can prevent this API from - functioning properly. + Interconnect. + + In the event of a + global outage, do not use this API to make decisions + about where to redirect your network traffic. + + Unlike a VLAN attachment, which is regional, a Cloud + Interconnect connection is a global resource. A global + outage can prevent this API from functioning properly. .. code-block:: python @@ -1728,9 +1732,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified Interconnect with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1860,9 +1864,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified Interconnect with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2018,7 +2022,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an Interconnect. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -2154,7 +2159,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Interconnect. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py index cfa76b86ca96..c05b574c6703 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py @@ -722,21 +722,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -888,6 +899,7 @@ def __call__( Returns: ~.compute.Interconnect: Represents an Interconnect resource. + An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. @@ -1340,21 +1352,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1657,21 +1680,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1830,21 +1864,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py index 2c1cd07dd982..6cb3ac2b823d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py @@ -694,7 +694,7 @@ def get( r"""Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace images. + third-party partners who are creatingCloud Marketplace images. .. code-block:: python @@ -750,11 +750,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.LicenseCode: - Represents a License Code resource. A License Code is a - unique identifier used to represent a license resource. - *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace - images. + Represents a License Code resource. + + A License Code is a unique identifier used to + represent alicense resource. *Caution* This resource + is intended for use only by third-party partners who + are creatingCloud Marketplace images. """ # Create or coerce a protobuf request object. @@ -827,7 +828,7 @@ def test_iam_permissions( ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party - partners who are creating Cloud Marketplace images. + partners who are creatingCloud Marketplace images. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py index 4b8cf173f205..f12c9d32eb65 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py @@ -332,11 +332,12 @@ def __call__( Returns: ~.compute.LicenseCode: - Represents a License Code resource. A License Code is a - unique identifier used to represent a license resource. - *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace - images. + Represents a License Code resource. + + A License Code is a unique identifier used to represent + alicense resource. *Caution* This resource is intended + for use only by third-party partners who are + creatingCloud Marketplace images. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py index ce2b9b44690a..0ee0aa7ff55d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py @@ -696,8 +696,8 @@ def delete_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes the specified license. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -821,8 +821,8 @@ def delete( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified license. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -971,7 +971,7 @@ def get( ) -> compute.License: r"""Returns the specified License resource. *Caution* This resource is intended for use only by third-party partners who are - creating Cloud Marketplace images. + creatingCloud Marketplace images. .. code-block:: python @@ -1026,11 +1026,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.License: - Represents a License resource. A License represents - billing and aggregate usage data for public and - marketplace images. *Caution* This resource is intended - for use only by third-party partners who are creating - Cloud Marketplace images. + Represents a License resource. + + A License represents billing and aggregate usage data forpublic andmarketplace images. + *Caution* This resource is intended for + + use only by third-party partners who are + creatingCloud Marketplace images. """ # Create or coerce a protobuf request object. @@ -1098,8 +1100,8 @@ def get_iam_policy( ) -> compute.Policy: r"""Gets the access control policy for a resource. May be empty if no such policy or resource exists. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -1155,28 +1157,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1244,7 +1254,7 @@ def insert_unary( ) -> compute.Operation: r"""Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -1361,7 +1371,7 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -1504,9 +1514,9 @@ def list( other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a - request to the respective image project, such as debian-cloud or - windows-cloud. *Caution* This resource is intended for use only - by third-party partners who are creating Cloud Marketplace + request to the respective image project, such as debian-cloud + orwindows-cloud. *Caution* This resource is intended for use + only by third-party partners who are creatingCloud Marketplace images. .. code-block:: python @@ -1632,8 +1642,8 @@ def set_iam_policy( ) -> compute.Policy: r"""Sets the access control policy on the specified resource. Replaces any existing policy. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -1694,28 +1704,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1790,7 +1808,7 @@ def test_iam_permissions( ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party - partners who are creating Cloud Marketplace images. + partners who are creatingCloud Marketplace images. .. code-block:: python @@ -1923,7 +1941,7 @@ def update_unary( ) -> compute.Operation: r"""Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -2054,7 +2072,7 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py index f95021054483..6071edd278b9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py @@ -650,21 +650,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -812,11 +823,12 @@ def __call__( Returns: ~.compute.License: - Represents a License resource. A License represents - billing and aggregate usage data for public and - marketplace images. *Caution* This resource is intended - for use only by third-party partners who are creating - Cloud Marketplace images. + Represents a License resource. + + A License represents billing and aggregate usage data + forpublic andmarketplace images. *Caution* This resource + is intended for use only by third-party partners who are + creatingCloud Marketplace images. """ @@ -960,26 +972,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1131,21 +1194,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1442,26 +1516,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1772,21 +1897,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py index 07cefd71e775..64ef4e1fc555 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py @@ -1025,13 +1025,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.MachineImage: Represents a machine image resource. + A machine image is a Compute Engine resource that stores all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) - instance. For more information, see - Machine images. + instance. For more information, + seeMachine images. """ # Create or coerce a protobuf request object. @@ -1154,28 +1155,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1693,28 +1702,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1788,7 +1805,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a machine image. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1924,7 +1941,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a machine image. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py index 24fc10bed737..fd52ad6840d7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py @@ -656,21 +656,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -822,13 +833,14 @@ def __call__( Returns: ~.compute.MachineImage: Represents a machine image resource. + A machine image is a Compute Engine resource that stores all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) - instance. For more information, see - Machine images. + instance. For more information, + seeMachine images. """ @@ -976,26 +988,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1143,21 +1206,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1461,26 +1535,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1635,21 +1760,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py index 9a74b3ecf8e3..3f8929310b1c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py @@ -693,8 +693,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of machine types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of machine types. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -880,10 +881,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.MachineType: Represents a Machine Type resource. + You can use specific machine types for your VM instances based on performance and pricing requirements. For more - information, read Machine Types. + information, readMachine Types. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py index 08dc58a1708a..8bd92f75b9f3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py @@ -535,10 +535,11 @@ def __call__( Returns: ~.compute.MachineType: Represents a Machine Type resource. + You can use specific machine types for your VM instances based on performance and pricing requirements. For more - information, read Machine Types. + information, readMachine Types. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py index 63bef28652b9..9e458e89f274 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py @@ -707,8 +707,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all NetworkAttachment resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1189,8 +1190,8 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkAttachment: - NetworkAttachments A network - attachment resource ... + NetworkAttachments + A network attachment resource ... """ # Create or coerce a protobuf request object. @@ -1327,28 +1328,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1843,8 +1852,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified NetworkAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1992,8 +2001,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified NetworkAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2238,28 +2247,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py index 792211bcafd4..2e79457f508a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py @@ -876,21 +876,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1041,8 +1052,8 @@ def __call__( Returns: ~.compute.NetworkAttachment: - NetworkAttachments A network - attachment resource ... + NetworkAttachments + A network attachment resource ... """ @@ -1193,26 +1204,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1362,21 +1424,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1683,21 +1756,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1860,26 +1944,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py index c307b264df59..f206bbc6e1f7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py @@ -715,9 +715,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all NetworkEdgeSecurityService resources - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py index b0a289f68fd7..d919373a4ec9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py @@ -663,21 +663,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -977,21 +988,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1147,21 +1169,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py index 1e7f9fc1f251..7092209eaa21 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py @@ -709,7 +709,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of network endpoint groups and sorts them by - zone. To prevent failure, Google recommends that you set the + zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -879,9 +881,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1039,9 +1041,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1224,9 +1226,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1367,9 +1369,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1535,9 +1537,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1695,9 +1697,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1874,9 +1876,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1899,13 +1901,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. @@ -2019,9 +2022,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the zone where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2157,9 +2160,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the zone where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2317,9 +2320,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of thezone + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2462,9 +2465,9 @@ def sample_list_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py index d82706df7149..51d6ae1d2b18 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py @@ -892,21 +892,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1063,21 +1074,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1228,21 +1250,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1399,13 +1432,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1554,21 +1588,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py index 950aed5d0eef..d8bb54affc43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py @@ -1614,8 +1614,9 @@ def aggregated_list( ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of network firewall policies, listing network firewall policies from all applicable scopes - (global and regional) and grouping the results per scope. To - prevent failure, Google recommends that you set the + (global and regional) and grouping the results per scope. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -2590,28 +2591,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -5116,28 +5125,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py index a77b1e407678..2169bf16addf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py @@ -1404,21 +1404,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1576,21 +1587,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1748,21 +1770,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2068,21 +2101,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2232,21 +2276,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2695,26 +2750,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3169,21 +3275,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3484,21 +3601,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3655,21 +3783,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3827,21 +3966,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3996,21 +4146,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4167,21 +4328,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4333,21 +4505,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4499,26 +4682,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py index 9a52a3181361..97f2caaeeb17 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py @@ -1309,9 +1309,10 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Network: Represents a VPC Network resource. + Networks connect resources to each other and to the internet. For more - information, read Virtual Private Cloud + information, readVirtual Private Cloud (VPC) Network. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py index 010b88bfd14a..b074dc32f1b3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py @@ -936,21 +936,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1106,21 +1117,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1269,9 +1291,10 @@ def __call__( Returns: ~.compute.Network: Represents a VPC Network resource. + Networks connect resources to each other and to the internet. For more - information, read Virtual Private Cloud + information, readVirtual Private Cloud (VPC) Network. """ @@ -1566,21 +1589,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2025,21 +2059,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2194,21 +2239,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2367,21 +2423,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2537,21 +2604,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2857,21 +2935,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py index 902379e44857..e634ed96127c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py @@ -1020,8 +1020,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of node groups. Note: use - nodeGroups.listNodes for more details about each group. To - prevent failure, Google recommends that you set the + nodeGroups.listNodes for more details about each group. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1833,16 +1834,16 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeGroup: Represents a sole-tenant Node Group - resource. A sole-tenant node is a - physical server that is dedicated to - hosting VM instances only for your - specific project. Use sole-tenant nodes - to keep your instances physically - separated from instances in other - projects, or to group your instances - together on the same host hardware. For - more information, read Sole-tenant - nodes. + resource. + A sole-tenant node is a physical server + that is dedicated to hosting VM + instances only for your specific + project. Use sole-tenant nodes to keep + your instances physically separated from + instances in other projects, or to group + your instances together on the same host + hardware. For more information, + readSole-tenant nodes. """ # Create or coerce a protobuf request object. @@ -1977,28 +1978,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3384,28 +3393,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py index bb922b43b567..7453702b4e6e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py @@ -1039,21 +1039,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1357,21 +1368,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1523,21 +1545,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1693,16 +1726,16 @@ def __call__( Returns: ~.compute.NodeGroup: Represents a sole-tenant Node Group - resource. A sole-tenant node is a - physical server that is dedicated to - hosting VM instances only for your - specific project. Use sole-tenant nodes - to keep your instances physically - separated from instances in other - projects, or to group your instances - together on the same host hardware. For - more information, read Sole-tenant - nodes. + resource. + A sole-tenant node is a physical server + that is dedicated to hosting VM + instances only for your specific + project. Use sole-tenant nodes to keep + your instances physically separated from + instances in other projects, or to group + your instances together on the same host + hardware. For more information, + readSole-tenant nodes. """ @@ -1848,26 +1881,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2019,21 +2103,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2480,21 +2575,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2651,21 +2757,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2823,26 +2940,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3003,21 +3171,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3175,21 +3354,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py index 797f867a2aa3..c0d34ebcce85 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py @@ -699,8 +699,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of node templates. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of node templates. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1181,10 +1182,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeTemplate: Represent a sole-tenant Node Template - resource. You can use a template to - define properties for nodes in a node - group. For more information, read - Creating node groups and instances. + resource. + You can use a template to define + properties for nodes in a node group. + For more information, readCreating node + groups and instances. """ # Create or coerce a protobuf request object. @@ -1319,28 +1321,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1911,28 +1921,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py index 3aee96f1e245..c46ba011aa39 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py @@ -809,21 +809,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -975,10 +986,11 @@ def __call__( Returns: ~.compute.NodeTemplate: Represent a sole-tenant Node Template - resource. You can use a template to - define properties for nodes in a node - group. For more information, read - Creating node groups and instances. + resource. + You can use a template to define + properties for nodes in a node group. + For more information, readCreating node + groups and instances. """ @@ -1126,26 +1138,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1293,21 +1356,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1611,26 +1685,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py index 485bb4d5213a..54159f500334 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py @@ -691,9 +691,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of node types. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of node types. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -877,15 +878,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeType: Represent a sole-tenant Node Type - resource. Each node within a node group - must have a node type. A node type - specifies the total amount of cores and - memory for that node. Currently, the - only available node type is - n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in - multiple zones. For more information - read Node types. + resource. + Each node within a node group must have + a node type. A node type specifies the + total amount of cores and memory for + that node. Currently, the only available + node type is n1-node-96-624 node type + that has 96 vCPUs and 624 GB of memory, + available in multiple zones. For more + information readNode types. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py index a78f73b343da..4e29ed299a51 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py @@ -531,15 +531,15 @@ def __call__( Returns: ~.compute.NodeType: Represent a sole-tenant Node Type - resource. Each node within a node group - must have a node type. A node type - specifies the total amount of cores and - memory for that node. Currently, the - only available node type is - n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in - multiple zones. For more information - read Node types. + resource. + Each node within a node group must have + a node type. A node type specifies the + total amount of cores and memory for + that node. Currently, the only available + node type is n1-node-96-624 node type + that has 96 vCPUs and 624 GB of memory, + available in multiple zones. For more + information readNode types. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py index 618c3f7f87a0..ab396badf751 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py @@ -720,12 +720,15 @@ def add_association_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Inserts an association for the specified security - policy. This has billing implications. Projects in the + policy. + This has billing implications. Projects in the hierarchy with effective hierarchical security policies will be automatically enrolled into Cloud Armor - Enterprise if not already enrolled. Use of this API to - modify firewall policies is deprecated. Use - firewallPolicies.addAssociation instead if possible. + Enterprise if not already enrolled. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.addAssociation instead + if possible. .. code-block:: python @@ -853,12 +856,15 @@ def add_association( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts an association for the specified security - policy. This has billing implications. Projects in the + policy. + This has billing implications. Projects in the hierarchy with effective hierarchical security policies will be automatically enrolled into Cloud Armor - Enterprise if not already enrolled. Use of this API to - modify firewall policies is deprecated. Use - firewallPolicies.addAssociation instead if possible. + Enterprise if not already enrolled. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.addAssociation instead + if possible. .. code-block:: python @@ -1270,9 +1276,10 @@ def copy_rules_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Copies rules to the specified security policy. Use of - this API to modify firewall policies is deprecated. Use - firewallPolicies.copyRules instead. + r"""Copies rules to the specified security policy. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.copyRules instead. .. code-block:: python @@ -1385,9 +1392,10 @@ def copy_rules( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Copies rules to the specified security policy. Use of - this API to modify firewall policies is deprecated. Use - firewallPolicies.copyRules instead. + r"""Copies rules to the specified security policy. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.copyRules instead. .. code-block:: python @@ -1523,9 +1531,10 @@ def delete_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Deletes the specified policy. Use of this API to - remove firewall policies is deprecated. Use - firewallPolicies.delete instead. + r"""Deletes the specified policy. + + Use of this API to remove firewall policies is + deprecated. Use firewallPolicies.delete instead. .. code-block:: python @@ -1638,9 +1647,10 @@ def delete( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Deletes the specified policy. Use of this API to - remove firewall policies is deprecated. Use - firewallPolicies.delete instead. + r"""Deletes the specified policy. + + Use of this API to remove firewall policies is + deprecated. Use firewallPolicies.delete instead. .. code-block:: python @@ -1777,9 +1787,9 @@ def get( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicy: r"""List all of the ordered rules present in a single - specified policy. Use of this API to read firewall - policies is deprecated. Use firewallPolicies.get - instead. + specified policy. + Use of this API to read firewall policies is deprecated. + Use firewallPolicies.get instead. .. code-block:: python @@ -1828,11 +1838,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -1894,9 +1904,10 @@ def get_association( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicyAssociation: - r"""Gets an association with the specified name. Use of - this API to read firewall policies is deprecated. Use - firewallPolicies.getAssociation instead if possible. + r"""Gets an association with the specified name. + + Use of this API to read firewall policies is deprecated. + Use firewallPolicies.getAssociation instead if possible. .. code-block:: python @@ -2009,9 +2020,10 @@ def get_rule( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicyRule: - r"""Gets a rule at the specified priority. Use of this - API to read firewall policies is deprecated. Use - firewallPolicies.getRule instead. + r"""Gets a rule at the specified priority. + + Use of this API to read firewall policies is deprecated. + Use firewallPolicies.getRule instead. .. code-block:: python @@ -2126,10 +2138,11 @@ def insert_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Creates a new policy in the specified project using - the data included in the request. Use of this API to - insert firewall policies is deprecated. Use - firewallPolicies.insert instead. + r"""Creates a new policy in the specified organization + using the data included in the request. + + Use of this API to insert firewall policies is + deprecated. Use firewallPolicies.insert instead. .. code-block:: python @@ -2231,10 +2244,11 @@ def insert( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Creates a new policy in the specified project using - the data included in the request. Use of this API to - insert firewall policies is deprecated. Use - firewallPolicies.insert instead. + r"""Creates a new policy in the specified organization + using the data included in the request. + + Use of this API to insert firewall policies is + deprecated. Use firewallPolicies.insert instead. .. code-block:: python @@ -2360,9 +2374,10 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""List all the policies that have been configured for - the specified project. Use of this API to read firewall - policies is deprecated. Use firewallPolicies.list - instead. + the specified organization. + + Use of this API to read firewall policies is deprecated. + Use firewallPolicies.list instead. .. code-block:: python @@ -2456,9 +2471,10 @@ def list_associations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.OrganizationSecurityPoliciesListAssociationsResponse: r"""Lists associations of a specified target, i.e., - organization or folder. Use of this API to read firewall - policies is deprecated. Use - firewallPolicies.listAssociations instead if possible. + organization or folder. + Use of this API to read firewall policies is deprecated. + Use firewallPolicies.listAssociations instead if + possible. .. code-block:: python @@ -2628,9 +2644,10 @@ def move_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Moves the specified security policy. Use of this API - to modify firewall policies is deprecated. Use - firewallPolicies.move instead. + r"""Moves the specified security policy. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.move instead. .. code-block:: python @@ -2743,9 +2760,10 @@ def move( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Moves the specified security policy. Use of this API - to modify firewall policies is deprecated. Use - firewallPolicies.move instead. + r"""Moves the specified security policy. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.move instead. .. code-block:: python @@ -2884,9 +2902,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included - in the request. Use of this API to modify firewall - policies is deprecated. Use firewallPolicies.patch - instead. + in the request. + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.patch instead. .. code-block:: python @@ -3008,9 +3026,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included - in the request. Use of this API to modify firewall - policies is deprecated. Use firewallPolicies.patch - instead. + in the request. + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.patch instead. .. code-block:: python @@ -3154,9 +3172,10 @@ def patch_rule_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Patches a rule at the specified priority. Use of this - API to modify firewall policies is deprecated. Use - firewallPolicies.patchRule instead. + r"""Patches a rule at the specified priority. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.patchRule instead. .. code-block:: python @@ -3277,9 +3296,10 @@ def patch_rule( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Patches a rule at the specified priority. Use of this - API to modify firewall policies is deprecated. Use - firewallPolicies.patchRule instead. + r"""Patches a rule at the specified priority. + + Use of this API to modify firewall policies is + deprecated. Use firewallPolicies.patchRule instead. .. code-block:: python @@ -3423,7 +3443,8 @@ def remove_association_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Removes an association for the specified security - policy. Use of this API to modify firewall policies is + policy. + Use of this API to modify firewall policies is deprecated. Use firewallPolicies.removeAssociation instead if possible. @@ -3543,7 +3564,8 @@ def remove_association( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes an association for the specified security - policy. Use of this API to modify firewall policies is + policy. + Use of this API to modify firewall policies is deprecated. Use firewallPolicies.removeAssociation instead if possible. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py index 44139876590b..1b718cf895d5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py @@ -1125,21 +1125,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1297,21 +1308,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1466,21 +1488,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1632,21 +1665,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1797,11 +1841,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -2250,21 +2294,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2879,21 +2934,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3042,21 +3108,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3212,21 +3289,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3383,21 +3471,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3549,21 +3648,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py index cb012a3fb8be..0c286bf1eac4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py @@ -704,8 +704,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of packetMirrorings. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of packetMirrorings. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1184,15 +1185,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.PacketMirroring: Represents a Packet Mirroring - resource. Packet Mirroring clones the - traffic of specified instances in your - Virtual Private Cloud (VPC) network and - forwards it to a collector destination, - such as an instance group of an internal - TCP/UDP load balancer, for analysis or - examination. For more information about - setting up Packet Mirroring, see Using - Packet Mirroring. + resource. + Packet Mirroring clones the traffic of + specified instances in your Virtual + Private Cloud (VPC) network and forwards + it to a collector destination, such as + an instance group of an internal TCP/UDP + load balancer, for analysis or + examination. + For more information about setting up + Packet Mirroring, seeUsing Packet + Mirroring. """ # Create or coerce a protobuf request object. @@ -1688,9 +1691,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified PacketMirroring resource with - the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1837,9 +1840,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified PacketMirroring resource with - the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py index 0aa3e3b71b0e..2ef71134ce71 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py @@ -761,21 +761,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -927,15 +938,17 @@ def __call__( Returns: ~.compute.PacketMirroring: Represents a Packet Mirroring - resource. Packet Mirroring clones the - traffic of specified instances in your - Virtual Private Cloud (VPC) network and - forwards it to a collector destination, - such as an instance group of an internal - TCP/UDP load balancer, for analysis or - examination. For more information about - setting up Packet Mirroring, see Using - Packet Mirroring. + resource. + Packet Mirroring clones the traffic of + specified instances in your Virtual + Private Cloud (VPC) network and forwards + it to a collector destination, such as + an instance group of an internal TCP/UDP + load balancer, for analysis or + examination. + For more information about setting up + Packet Mirroring, seeUsing Packet + Mirroring. """ @@ -1085,21 +1098,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1408,21 +1432,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py index 5a7099cb866a..1d5ae7f5f5f9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py @@ -682,21 +682,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py index 561b1153b474..d1fb372e989a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py @@ -1700,14 +1700,15 @@ def get( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Project: - r"""Returns the specified Project resource. To decrease latency for - this method, you can optionally omit any unneeded information - from the response by using a field mask. This practice is - especially recommended for unused quota information (the - ``quotas`` field). To exclude one or more fields, set your - request's ``fields`` query parameter to only include the fields - you need. For example, to only include the ``id`` and - ``selfLink`` fields, add the query parameter + r"""Returns the specified Project resource. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter ``?fields=id,selfLink`` to your request. .. code-block:: python @@ -1755,10 +1756,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -1866,10 +1868,11 @@ def sample_get_xpn_host(): Returns: google.cloud.compute_v1beta.types.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -2183,15 +2186,21 @@ def move_disk_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starting September 29, 2025, you can't use the moveDisk API on + r"""Moves a persistent disk from one zone to another. *Note*: The + moveDisk API will be deprecated on September 29, 2026. + + Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in `Change the location of a - disk `__. + disk `__. + Projects that already use the moveDisk API can continue usage - until September 29, 2026. Starting November 1, 2025, API - responses will include a warning message in the response body - about the upcoming deprecation. You can skip the message to - continue using the service without interruption. + until September 29, 2026. + + Starting November 1, 2025, API responses will include a warning + message in the response body about the upcoming deprecation. You + can skip the message to continue using the service without + interruption. .. code-block:: python @@ -2306,15 +2315,21 @@ def move_disk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starting September 29, 2025, you can't use the moveDisk API on + r"""Moves a persistent disk from one zone to another. *Note*: The + moveDisk API will be deprecated on September 29, 2026. + + Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in `Change the location of a - disk `__. + disk `__. + Projects that already use the moveDisk API can continue usage - until September 29, 2026. Starting November 1, 2025, API - responses will include a warning message in the response body - about the upcoming deprecation. You can skip the message to - continue using the service without interruption. + until September 29, 2026. + + Starting November 1, 2025, API responses will include a warning + message in the response body about the upcoming deprecation. You + can skip the message to continue using the service without + interruption. .. code-block:: python @@ -2728,8 +2743,8 @@ def set_cloud_armor_tier_unary( r"""Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See - Subscribing to Cloud Armor Enterprise for more - information. + Subscribing + to Cloud Armor Enterprise for more information. .. code-block:: python @@ -2851,8 +2866,8 @@ def set_cloud_armor_tier( r"""Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See - Subscribing to Cloud Armor Enterprise for more - information. + Subscribing + to Cloud Armor Enterprise for more information. .. code-block:: python @@ -3538,8 +3553,8 @@ def set_managed_protection_tier_unary( r"""Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set PLUS or above the billing account of the project must be subscribed to Managed Protection - Plus. See Subscribing to Managed Protection Plus for - more information. + Plus. See Subscribing + to Managed Protection Plus for more information. .. code-block:: python @@ -3668,8 +3683,8 @@ def set_managed_protection_tier( r"""Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set PLUS or above the billing account of the project must be subscribed to Managed Protection - Plus. See Subscribing to Managed Protection Plus for - more information. + Plus. See Subscribing + to Managed Protection Plus for more information. .. code-block:: python @@ -3817,7 +3832,7 @@ def set_usage_export_bucket_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Enables the usage export feature and sets the usage + r"""Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. @@ -3937,7 +3952,7 @@ def set_usage_export_bucket( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Enables the usage export feature and sets the usage + r"""Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py index f3eab97404d4..653c7057eb9f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py @@ -1052,21 +1052,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1222,21 +1233,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1392,21 +1414,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1560,21 +1593,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1727,10 +1771,11 @@ def __call__( Returns: ~.compute.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -1874,10 +1919,11 @@ def __call__( Returns: ~.compute.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -2334,21 +2380,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2503,21 +2560,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2676,21 +2744,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2848,21 +2927,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3019,21 +3109,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3191,21 +3292,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3362,21 +3474,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py index c2ac82afb7d4..a643dbc88318 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py @@ -1785,9 +1785,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1929,9 +1929,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py index 843f3f2d2742..fdb90b26a73f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py @@ -615,21 +615,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -779,21 +790,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1095,21 +1117,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1412,21 +1445,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1581,21 +1625,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py index 678812bb1d47..67caf8737d57 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py @@ -711,8 +711,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Lists all PublicDelegatedPrefix resources owned by the specific - project across all scopes. To prevent failure, Google recommends - that you set the ``returnPartialSuccess`` parameter to ``true``. + project across all scopes. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -882,9 +884,9 @@ def sample_announce(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1021,9 +1023,9 @@ def sample_announce(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2022,8 +2024,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method - supports PATCH semantics and uses JSON merge patch - format and processing rules. + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2177,8 +2179,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method - supports PATCH semantics and uses JSON merge patch - format and processing rules. + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2394,9 +2396,9 @@ def sample_withdraw(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2533,9 +2535,9 @@ def sample_withdraw(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py index dc610082b45c..98e3bb5f5556 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py @@ -826,21 +826,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -990,21 +1001,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1309,21 +1331,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1626,21 +1659,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1795,21 +1839,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py index 1a493e99f1a5..c30b75f44cc5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py @@ -1059,18 +1059,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - [Zonal](/compute/docs/reference/rest/beta/autoscalers) - \* - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) - Use autoscalers to automatically add or delete instances - from a managed instance group according to your defined - autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - [Zonal](/compute/docs/reference/rest/beta/autoscalers) + - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) + + Use autoscalers to automatically add or delete + instances from a managed instance group according to + your defined autoscaling policy. For more + information, read Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ # Create or coerce a protobuf request object. @@ -1428,8 +1433,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of autoscalers contained within the - specified region. + r"""Retrieves a list of autoscalers contained within + the specified region. .. code-block:: python @@ -1569,9 +1574,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1703,9 +1708,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py index a83e2275a4ab..088ef49f729b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py @@ -608,21 +608,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -773,18 +784,23 @@ def __call__( Returns: ~.compute.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - `Zonal `__ - \* - `Regional `__ + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - `Zonal `__ + - `Regional `__ + Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ @@ -934,21 +950,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1257,21 +1284,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1587,21 +1625,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py new file mode 100644 index 000000000000..2cea388ac68e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionBackendBucketsClient + +__all__ = ("RegionBackendBucketsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py new file mode 100644 index 000000000000..983907c9667d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py @@ -0,0 +1,2541 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_backend_buckets import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RegionBackendBucketsTransport +from .transports.rest import RegionBackendBucketsRestTransport + + +class RegionBackendBucketsClientMeta(type): + """Metaclass for the RegionBackendBuckets client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionBackendBucketsTransport]] + _transport_registry["rest"] = RegionBackendBucketsRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionBackendBucketsTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionBackendBucketsClient(metaclass=RegionBackendBucketsClientMeta): + """The RegionBackendBuckets API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionBackendBucketsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionBackendBucketsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionBackendBucketsTransport: + """Returns the transport used by the client instance. + + Returns: + RegionBackendBucketsTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert == "true", use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionBackendBucketsClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionBackendBucketsTransport, + Callable[..., RegionBackendBucketsTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region backend buckets client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionBackendBucketsTransport,Callable[..., RegionBackendBucketsTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionBackendBucketsTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionBackendBucketsClient._read_environment_variables() + self._client_cert_source = RegionBackendBucketsClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + self._universe_domain = RegionBackendBucketsClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RegionBackendBucketsTransport) + if transport_provided: + # transport is a RegionBackendBucketsTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionBackendBucketsTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionBackendBucketsClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionBackendBucketsTransport], + Callable[..., RegionBackendBucketsTransport], + ] = ( + RegionBackendBucketsClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., RegionBackendBucketsTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionBackendBucketsClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "credentialsType": None, + }, + ) + + def delete_unary( + self, + request: Optional[Union[compute.DeleteRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified regional BackendBucket + resource. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + delete. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionBackendBucketRequest): + request = compute.DeleteRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[Union[compute.DeleteRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified regional BackendBucket + resource. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + delete. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionBackendBucketRequest): + request = compute.DeleteRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucket: + r"""Returns the specified regional BackendBucket + resource. + + .. 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 compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Get. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + return. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.BackendBucket: + Represents a Cloud Storage Bucket + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. + + """ + # 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. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionBackendBucketRequest): + request = compute.GetRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. 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 compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.GetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [project, region, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyRegionBackendBucketRequest): + request = compute.GetIamPolicyRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[Union[compute.InsertRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a RegionBackendBucket in the specified + project in the given scope using the parameters that are + included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionBackendBucketRequest): + request = compute.InsertRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[Union[compute.InsertRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a RegionBackendBucket in the specified + project in the given scope using the parameters that are + included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionBackendBucketRequest): + request = compute.InsertRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[Union[compute.ListRegionBackendBucketsRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Retrieves the list of BackendBucket resources + available to the specified project in the given region. + + .. 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 compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest, dict]): + The request object. A request message for + RegionBackendBuckets.List. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListPager: + Contains a list of BackendBucket + resources. + 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. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionBackendBucketsRequest): + request = compute.ListRegionBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def list_usable( + self, + request: Optional[ + Union[compute.ListUsableRegionBackendBucketsRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListUsablePager: + r"""Retrieves a list of all usable backend buckets in the + specified project in the given region. + + .. 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 compute_v1beta + + def sample_list_usable(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListUsableRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list_usable(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest, dict]): + The request object. A request message for + RegionBackendBuckets.ListUsable. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. It must be a string that meets + the requirements in RFC1035. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListUsablePager: + 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. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListUsableRegionBackendBucketsRequest): + request = compute.ListUsableRegionBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list_usable] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListUsablePager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[Union[compute.PatchRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified BackendBucket resource with + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + patch. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionBackendBucketRequest): + request = compute.PatchRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[Union[compute.PatchRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified BackendBucket resource with + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + patch. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, backend_bucket, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionBackendBucketRequest): + request = compute.PatchRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_policy_request_resource: Optional[ + compute.RegionSetPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. 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 compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.SetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): + The body resource for this request + This corresponds to the ``region_set_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [ + project, + region, + resource, + region_set_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyRegionBackendBucketRequest): + request = compute.SetIamPolicyRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if region_set_policy_request_resource is not None: + request.region_set_policy_request_resource = ( + region_set_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. 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 compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # 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. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionBackendBucketRequest + ): + request = compute.TestIamPermissionsRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionBackendBucketsClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionBackendBucketsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py new file mode 100644 index 000000000000..ba57b38f423e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketList], + request: compute.ListRegionBackendBucketsRequest, + response: compute.BackendBucketList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.BackendBucket]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListUsablePager: + """A pager for iterating through ``list_usable`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketListUsable` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``ListUsable`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketListUsable` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketListUsable], + request: compute.ListUsableRegionBackendBucketsRequest, + response: compute.BackendBucketListUsable, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketListUsable): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListUsableRegionBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketListUsable]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.BackendBucket]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst new file mode 100644 index 000000000000..a2c52d83d838 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionBackendBucketsTransport` is the ABC for all transports. +- public child `RegionBackendBucketsGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionBackendBucketsGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionBackendBucketsRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionBackendBucketsRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py new file mode 100644 index 000000000000..d7bffabc6226 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionBackendBucketsTransport +from .rest import RegionBackendBucketsRestInterceptor, RegionBackendBucketsRestTransport + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionBackendBucketsTransport]] +_transport_registry["rest"] = RegionBackendBucketsRestTransport + +__all__ = ( + "RegionBackendBucketsTransport", + "RegionBackendBucketsRestTransport", + "RegionBackendBucketsRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py new file mode 100644 index 000000000000..2044874d091e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionBackendBucketsTransport(abc.ABC): + """Abstract transport class for RegionBackendBuckets.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.list_usable: gapic_v1.method.wrap_method( + self.list_usable, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionBackendBucketRequest], + Union[compute.BackendBucket, Awaitable[compute.BackendBucket]], + ]: + raise NotImplementedError() + + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyRegionBackendBucketRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionBackendBucketsRequest], + Union[compute.BackendBucketList, Awaitable[compute.BackendBucketList]], + ]: + raise NotImplementedError() + + @property + def list_usable( + self, + ) -> Callable[ + [compute.ListUsableRegionBackendBucketsRequest], + Union[ + compute.BackendBucketListUsable, Awaitable[compute.BackendBucketListUsable] + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyRegionBackendBucketRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionBackendBucketRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionBackendBucketsTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py new file mode 100644 index 000000000000..66e511d6d1b4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py @@ -0,0 +1,2348 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionBackendBucketsRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionBackendBucketsRestInterceptor: + """Interceptor for RegionBackendBuckets. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionBackendBucketsRestTransport. + + .. code-block:: python + class MyCustomRegionBackendBucketsInterceptor(RegionBackendBucketsRestInterceptor): + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list_usable(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list_usable(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionBackendBucketsRestTransport(interceptor=MyCustomRegionBackendBucketsInterceptor()) + client = RegionBackendBucketsClient(transport=transport) + + + """ + + def pre_delete( + self, + request: compute.DeleteRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionBackendBucketRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_get(self, response: compute.BackendBucket) -> compute.BackendBucket: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.BackendBucket, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.BackendBucket, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionBackendBucketsRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_list( + self, response: compute.BackendBucketList + ) -> compute.BackendBucketList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.BackendBucketList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.BackendBucketList, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_list_usable( + self, + request: compute.ListUsableRegionBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListUsableRegionBackendBucketsRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list_usable + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_list_usable( + self, response: compute.BackendBucketListUsable + ) -> compute.BackendBucketListUsable: + """Post-rpc interceptor for list_usable + + DEPRECATED. Please use the `post_list_usable_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_list_usable` interceptor runs + before the `post_list_usable_with_metadata` interceptor. + """ + return response + + def post_list_usable_with_metadata( + self, + response: compute.BackendBucketListUsable, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.BackendBucketListUsable, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list_usable + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_list_usable_with_metadata` + interceptor in new development instead of the `post_list_usable` interceptor. + When both interceptors are used, this `post_list_usable_with_metadata` interceptor runs after the + `post_list_usable` interceptor. The (possibly modified) response returned by + `post_list_usable` will be passed to + `post_list_usable_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionBackendBucketRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionBackendBucketsRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionBackendBucketsRestInterceptor + + +class RegionBackendBucketsRestTransport(_BaseRegionBackendBucketsRestTransport): + """REST backend synchronous transport for RegionBackendBuckets. + + The RegionBackendBuckets API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionBackendBucketsRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RegionBackendBucketsRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Delete( + _BaseRegionBackendBucketsRestTransport._BaseDelete, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionBackendBucketsRestTransport._BaseGet, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucket: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Get. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucket: + Represents a Cloud Storage Bucket + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucket() + pb_resp = compute.BackendBucket.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucket.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _GetIamPolicy( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.GetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionBackendBucketsRestTransport._BaseInsert, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionBackendBucketsRestTransport._BaseList, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionBackendBucketsRequest): + The request object. A request message for + RegionBackendBuckets.List. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketList: + Contains a list of BackendBucket + resources. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = ( + _BaseRegionBackendBucketsRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketList() + pb_resp = compute.BackendBucketList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketList.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _ListUsable( + _BaseRegionBackendBucketsRestTransport._BaseListUsable, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.ListUsable") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListUsableRegionBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketListUsable: + r"""Call the list usable method over HTTP. + + Args: + request (~.compute.ListUsableRegionBackendBucketsRequest): + The request object. A request message for + RegionBackendBuckets.ListUsable. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketListUsable: + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_http_options() + ) + + request, metadata = self._interceptor.pre_list_usable(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.ListUsable", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "ListUsable", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._ListUsable._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketListUsable() + pb_resp = compute.BackendBucketListUsable.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list_usable(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_usable_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketListUsable.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.list_usable", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "ListUsable", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionBackendBucketsRestTransport._BasePatch, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _SetIamPolicy( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.SetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionBackendBucketsRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def delete( + self, + ) -> Callable[[compute.DeleteRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[[compute.GetRegionBackendBucketRequest], compute.BackendBucket]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyRegionBackendBucketRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[[compute.ListRegionBackendBucketsRequest], compute.BackendBucketList]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def list_usable( + self, + ) -> Callable[ + [compute.ListUsableRegionBackendBucketsRequest], compute.BackendBucketListUsable + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._ListUsable(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[[compute.PatchRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyRegionBackendBucketRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionBackendBucketRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionBackendBucketsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py new file mode 100644 index 000000000000..dd51bc4429f3 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py @@ -0,0 +1,547 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionBackendBucketsTransport + + +class _BaseRegionBackendBucketsRestTransport(RegionBackendBucketsTransport): + """Base REST backend transport for RegionBackendBuckets. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets", + "body": "backend_bucket_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseListUsable: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/listUsable", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListUsableRegionBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + "body": "backend_bucket_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", + "body": "region_set_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsRegionBackendBucketRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionBackendBucketsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py index 4e8bb1698f4d..8b00ad442c4f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py @@ -1074,21 +1074,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be + either regionally or globally scoped. + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) + + For more information, seeBackend Services. """ # Create or coerce a protobuf request object. @@ -1378,28 +1382,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2052,8 +2064,9 @@ def patch_unary( r"""Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This - method supports PATCH semantics and uses the JSON merge - patch format and processing rules. + method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2199,8 +2212,9 @@ def patch( r"""Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This - method supports PATCH semantics and uses the JSON merge - patch format and processing rules. + method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2442,28 +2456,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2548,8 +2570,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -2707,8 +2729,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3045,7 +3067,8 @@ def update_unary( ) -> compute.Operation: r"""Updates the specified regional BackendService resource with the data included in the request. For more - information, see Backend services overview . + information, see + Backend services overview. .. code-block:: python @@ -3192,7 +3215,8 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional BackendService resource with the data included in the request. For more - information, see Backend services overview . + information, see + Backend services overview. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py index 014f891c7e1a..569a584ecbd1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py @@ -899,21 +899,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1062,21 +1073,25 @@ def __call__( Returns: ~.compute.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be either + regionally or globally scoped. + + - `Global `__ + - `Regional `__ + + For more information, seeBackend Services. """ @@ -1380,26 +1395,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1550,21 +1616,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2017,21 +2094,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2188,26 +2276,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2363,21 +2502,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2694,21 +2844,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py index 9fc4c0bf24af..f3a1d80302e4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py @@ -706,8 +706,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of commitments by region. To - prevent failure, Google recommends that you set the + r"""Retrieves an aggregated list of commitments by region. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -891,15 +892,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Commitment: Represents a regional resource-based - commitment resource. Creating this - commitment resource means that you are - purchasing a resource-based committed - use contract, with an explicit start and - end time. You can purchase + commitment resource. + Creating this commitment resource means + that you are purchasing a resource-based + committed use contract, with an explicit + start and end time. You can purchase resource-based commitments for both hardware and software resources. For - more information, read Resource-based - committed use discounts + more information, read + Resource-based committed use discounts """ # Create or coerce a protobuf request object. @@ -1253,8 +1254,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of commitments contained within the - specified region. + r"""Retrieves a list of commitments contained within + the specified region. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py index b3925cdbfeac..197bf1747e3a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py @@ -762,15 +762,15 @@ def __call__( Returns: ~.compute.Commitment: Represents a regional resource-based - commitment resource. Creating this - commitment resource means that you are - purchasing a resource-based committed - use contract, with an explicit start and - end time. You can purchase + commitment resource. + Creating this commitment resource means + that you are purchasing a resource-based + committed use contract, with an explicit + start and end time. You can purchase resource-based commitments for both hardware and software resources. For - more information, read Resource-based - committed use discounts + more information, read + Resource-based committed use discounts """ @@ -920,21 +920,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1400,21 +1411,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1576,21 +1598,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py new file mode 100644 index 000000000000..badc82228c79 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionCompositeHealthChecksClient + +__all__ = ("RegionCompositeHealthChecksClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py new file mode 100644 index 000000000000..e2790588c7cb --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py @@ -0,0 +1,2236 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_composite_health_checks import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RegionCompositeHealthChecksTransport +from .transports.rest import RegionCompositeHealthChecksRestTransport + + +class RegionCompositeHealthChecksClientMeta(type): + """Metaclass for the RegionCompositeHealthChecks client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionCompositeHealthChecksTransport]] + _transport_registry["rest"] = RegionCompositeHealthChecksRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionCompositeHealthChecksTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionCompositeHealthChecksClient( + metaclass=RegionCompositeHealthChecksClientMeta +): + """The RegionCompositeHealthChecks API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionCompositeHealthChecksClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionCompositeHealthChecksClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionCompositeHealthChecksTransport: + """Returns the transport used by the client instance. + + Returns: + RegionCompositeHealthChecksTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert == "true", use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionCompositeHealthChecksTransport, + Callable[..., RegionCompositeHealthChecksTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region composite health checks client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionCompositeHealthChecksTransport,Callable[..., RegionCompositeHealthChecksTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionCompositeHealthChecksTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionCompositeHealthChecksClient._read_environment_variables() + self._client_cert_source = ( + RegionCompositeHealthChecksClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = RegionCompositeHealthChecksClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RegionCompositeHealthChecksTransport) + if transport_provided: + # transport is a RegionCompositeHealthChecksTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionCompositeHealthChecksTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionCompositeHealthChecksClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionCompositeHealthChecksTransport], + Callable[..., RegionCompositeHealthChecksTransport], + ] = ( + RegionCompositeHealthChecksClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast( + Callable[..., RegionCompositeHealthChecksTransport], transport + ) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionCompositeHealthChecksClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListRegionCompositeHealthChecksRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all CompositeHealthCheck resources (all + regional) available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. 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 compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionCompositeHealthChecksRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.AggregatedListPager: + Contains a list of + CompositeHealthChecksScopedList. + 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. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListRegionCompositeHealthChecksRequest + ): + request = compute.AggregatedListRegionCompositeHealthChecksRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified CompositeHealthCheck in the + given region + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to delete. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionCompositeHealthCheckRequest): + request = compute.DeleteRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified CompositeHealthCheck in the + given region + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to delete. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionCompositeHealthCheckRequest): + request = compute.DeleteRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheck: + r"""Returns the specified CompositeHealthCheck resource + in the given region. + + .. 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 compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to return. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.CompositeHealthCheck: + Represents a composite health check. + + A composite health check resource + specifies the health source resources + and the health destination resource to + which the aggregated health result from + the health source resources is + delivered. + + """ + # 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. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionCompositeHealthCheckRequest): + request = compute.GetRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Create a CompositeHealthCheck in the specified + project in the given region using the parameters that + are included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, composite_health_check_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionCompositeHealthCheckRequest): + request = compute.InsertRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Create a CompositeHealthCheck in the specified + project in the given region using the parameters that + are included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, composite_health_check_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionCompositeHealthCheckRequest): + request = compute.InsertRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListRegionCompositeHealthChecksRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists the CompositeHealthChecks for a project in the + given region. + + .. 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 compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionCompositeHealthChecksRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.List. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.ListPager: + 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. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionCompositeHealthChecksRequest): + request = compute.ListRegionCompositeHealthChecksRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[ + Union[compute.PatchRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified regional CompositeHealthCheck + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck to + update. The name must be 1-63 characters + long, and comply with RFC1035. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + region, + composite_health_check, + composite_health_check_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionCompositeHealthCheckRequest): + request = compute.PatchRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[ + Union[compute.PatchRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified regional CompositeHealthCheck + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck to + update. The name must be 1-63 characters + long, and comply with RFC1035. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + region, + composite_health_check, + composite_health_check_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionCompositeHealthCheckRequest): + request = compute.PatchRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. 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 compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # 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. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionCompositeHealthCheckRequest + ): + request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionCompositeHealthChecksClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionCompositeHealthChecksClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py new file mode 100644 index 000000000000..c712f01450f2 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py @@ -0,0 +1,198 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.CompositeHealthCheckAggregatedList], + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + response: compute.CompositeHealthCheckAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListRegionCompositeHealthChecksRequest( + request + ) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.CompositeHealthCheckAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.CompositeHealthChecksScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.CompositeHealthChecksScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.CompositeHealthCheckList], + request: compute.ListRegionCompositeHealthChecksRequest, + response: compute.CompositeHealthCheckList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.CompositeHealthCheckList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionCompositeHealthChecksRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.CompositeHealthCheckList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.CompositeHealthCheck]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst new file mode 100644 index 000000000000..97612e7c69fa --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionCompositeHealthChecksTransport` is the ABC for all transports. +- public child `RegionCompositeHealthChecksGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionCompositeHealthChecksGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionCompositeHealthChecksRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionCompositeHealthChecksRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py new file mode 100644 index 000000000000..3fffc275301e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionCompositeHealthChecksTransport +from .rest import ( + RegionCompositeHealthChecksRestInterceptor, + RegionCompositeHealthChecksRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionCompositeHealthChecksTransport]] +_transport_registry["rest"] = RegionCompositeHealthChecksRestTransport + +__all__ = ( + "RegionCompositeHealthChecksTransport", + "RegionCompositeHealthChecksRestTransport", + "RegionCompositeHealthChecksRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py new file mode 100644 index 000000000000..8d33992fe960 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py @@ -0,0 +1,275 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionCompositeHealthChecksTransport(abc.ABC): + """Abstract transport class for RegionCompositeHealthChecks.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionCompositeHealthChecksRequest], + Union[ + compute.CompositeHealthCheckAggregatedList, + Awaitable[compute.CompositeHealthCheckAggregatedList], + ], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionCompositeHealthCheckRequest], + Union[compute.CompositeHealthCheck, Awaitable[compute.CompositeHealthCheck]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionCompositeHealthChecksRequest], + Union[ + compute.CompositeHealthCheckList, + Awaitable[compute.CompositeHealthCheckList], + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionCompositeHealthCheckRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionCompositeHealthChecksTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py new file mode 100644 index 000000000000..4100ac193d8b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py @@ -0,0 +1,1795 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionCompositeHealthChecksRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionCompositeHealthChecksRestInterceptor: + """Interceptor for RegionCompositeHealthChecks. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionCompositeHealthChecksRestTransport. + + .. code-block:: python + class MyCustomRegionCompositeHealthChecksInterceptor(RegionCompositeHealthChecksRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionCompositeHealthChecksRestTransport(interceptor=MyCustomRegionCompositeHealthChecksInterceptor()) + client = RegionCompositeHealthChecksClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListRegionCompositeHealthChecksRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.CompositeHealthCheckAggregatedList + ) -> compute.CompositeHealthCheckAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.CompositeHealthCheckAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.CompositeHealthCheckAggregatedList, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_get( + self, response: compute.CompositeHealthCheck + ) -> compute.CompositeHealthCheck: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.CompositeHealthCheck, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.CompositeHealthCheck, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionCompositeHealthChecksRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionCompositeHealthChecksRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_list( + self, response: compute.CompositeHealthCheckList + ) -> compute.CompositeHealthCheckList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.CompositeHealthCheckList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.CompositeHealthCheckList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionCompositeHealthChecksRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionCompositeHealthChecksRestInterceptor + + +class RegionCompositeHealthChecksRestTransport( + _BaseRegionCompositeHealthChecksRestTransport +): + """REST backend synchronous transport for RegionCompositeHealthChecks. + + The RegionCompositeHealthChecks API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionCompositeHealthChecksRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RegionCompositeHealthChecksRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheckAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListRegionCompositeHealthChecksRequest): + The request object. A request message for + RegionCompositeHealthChecks.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheckAggregatedList: + Contains a list of + CompositeHealthChecksScopedList. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionCompositeHealthChecksRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheckAggregatedList() + pb_resp = compute.CompositeHealthCheckAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.CompositeHealthCheckAggregatedList.to_json(response) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheck: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheck: + Represents a composite health check. + + A composite health check resource + specifies the health source resources + and the health destination resource to + which the aggregated health result from + the health source resources is + delivered. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheck() + pb_resp = compute.CompositeHealthCheck.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.CompositeHealthCheck.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionCompositeHealthChecksRestTransport._BaseList, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionCompositeHealthChecksRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheckList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionCompositeHealthChecksRequest): + The request object. A request message for + RegionCompositeHealthChecks.List. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheckList: + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheckList() + pb_resp = compute.CompositeHealthCheckList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.CompositeHealthCheckList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionCompositeHealthChecksRequest], + compute.CompositeHealthCheckAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete( + self, + ) -> Callable[[compute.DeleteRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionCompositeHealthCheckRequest], compute.CompositeHealthCheck + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionCompositeHealthChecksRequest], + compute.CompositeHealthCheckList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[[compute.PatchRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionCompositeHealthCheckRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionCompositeHealthChecksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py new file mode 100644 index 000000000000..fcda0bb6524a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py @@ -0,0 +1,449 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionCompositeHealthChecksTransport + + +class _BaseRegionCompositeHealthChecksRestTransport( + RegionCompositeHealthChecksTransport +): + """Base REST backend transport for RegionCompositeHealthChecks. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/compositeHealthChecks", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListRegionCompositeHealthChecksRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks", + "body": "composite_health_check_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionCompositeHealthChecksRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + "body": "composite_health_check_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionCompositeHealthChecksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py index 882808e17d5a..7ed5ccb9edb3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py @@ -480,21 +480,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py index 4284280c7754..0626132ff38a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py @@ -762,17 +762,24 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) - \* [Zonal](/compute/docs/reference/rest/beta/diskTypes) - You can choose from a variety of disk types based on - your needs. For more information, read Storage options. - The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) + - [Zonal](/compute/docs/reference/rest/beta/diskTypes) + + You can choose from a variety of disk types based on + your needs. For more information, readStorage + options. + + The diskTypes resource represents disk types for a + zonal persistent disk. For more information, + readZonal persistent disks. + + The regionDiskTypes resource represents disk types + for a regional persistent disk. For more information, + read Regional persistent disks. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py index c31fbacff674..fc234d722f5c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py @@ -331,18 +331,23 @@ def __call__( Returns: ~.compute.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - `Regional `__ - \* - `Zonal `__ + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + You can choose from a variety of disk types based on - your needs. For more information, read Storage options. + your needs. For more information, readStorage options. + The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + persistent disk. For more information, readZonal + persistent disks. + + The regionDiskTypes resource represents disk types for a + regional persistent disk. For more information, read + Regional persistent disks. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py index b2aef8fd1b78..a5efa33e2653 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py @@ -1642,8 +1642,8 @@ def delete_unary( r"""Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting - a disk does not delete any snapshots previously made - from the disk. You must separately delete snapshots. + a disk does not delete anysnapshots previously made from + the disk. You must separatelydelete snapshots. .. code-block:: python @@ -1779,8 +1779,8 @@ def delete( r"""Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting - a disk does not delete any snapshots previously made - from the disk. You must separately delete snapshots. + a disk does not delete anysnapshots previously made from + the disk. You must separatelydelete snapshots. .. code-block:: python @@ -2000,18 +2000,26 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - [Zonal](/compute/docs/reference/rest/beta/disks) \* - [Regional](/compute/docs/reference/rest/beta/regionDisks) - Persistent disks are required for running your VM - instances. Create both boot and non-boot (data) - persistent disks. For more information, read Persistent - Disks. For more storage options, read Storage options. - The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - [Zonal](/compute/docs/reference/rest/beta/disks) + - [Regional](/compute/docs/reference/rest/beta/regionDisks) + + Persistent disks are required for running your VM + instances. Create both boot and non-boot (data) + persistent disks. For more information, read + Persistent Disks. For more storage options, read + Storage options. + + The disks resource represents a zonal persistent + disk. For more information, readZonal persistent + disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ # Create or coerce a protobuf request object. @@ -2146,28 +2154,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3372,28 +3388,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3802,8 +3826,8 @@ def start_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -3955,8 +3979,8 @@ def start_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4130,8 +4154,9 @@ def stop_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python @@ -4266,8 +4291,9 @@ def stop_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py index 4bdff65853ea..6f94aaa160dd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py @@ -1156,21 +1156,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1327,21 +1338,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1500,21 +1522,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1666,21 +1699,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1829,18 +1873,24 @@ def __call__( Returns: ~.compute.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - `Zonal `__ \* - `Regional `__ + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options. + The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + For more information, readZonal persistent disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ @@ -1988,26 +2038,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2159,21 +2260,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2474,21 +2586,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2643,21 +2766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2815,26 +2949,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2993,21 +3178,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3166,21 +3362,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3336,21 +3543,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3504,21 +3722,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3829,21 +4058,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py new file mode 100644 index 000000000000..ea97331d9412 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionHealthAggregationPoliciesClient + +__all__ = ("RegionHealthAggregationPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py new file mode 100644 index 000000000000..ba59fd0c1c88 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py @@ -0,0 +1,2258 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_health_aggregation_policies import ( + pagers, +) +from google.cloud.compute_v1beta.types import compute + +from .transports.base import ( + DEFAULT_CLIENT_INFO, + RegionHealthAggregationPoliciesTransport, +) +from .transports.rest import RegionHealthAggregationPoliciesRestTransport + + +class RegionHealthAggregationPoliciesClientMeta(type): + """Metaclass for the RegionHealthAggregationPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionHealthAggregationPoliciesTransport]] + _transport_registry["rest"] = RegionHealthAggregationPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionHealthAggregationPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionHealthAggregationPoliciesClient( + metaclass=RegionHealthAggregationPoliciesClientMeta +): + """The RegionHealthAggregationPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionHealthAggregationPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionHealthAggregationPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionHealthAggregationPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + RegionHealthAggregationPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert == "true", use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionHealthAggregationPoliciesTransport, + Callable[..., RegionHealthAggregationPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region health aggregation policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionHealthAggregationPoliciesTransport,Callable[..., RegionHealthAggregationPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionHealthAggregationPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionHealthAggregationPoliciesClient._read_environment_variables() + self._client_cert_source = ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance( + transport, RegionHealthAggregationPoliciesTransport + ) + if transport_provided: + # transport is a RegionHealthAggregationPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionHealthAggregationPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionHealthAggregationPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionHealthAggregationPoliciesTransport], + Callable[..., RegionHealthAggregationPoliciesTransport], + ] = ( + RegionHealthAggregationPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast( + Callable[..., RegionHealthAggregationPoliciesTransport], transport + ) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListRegionHealthAggregationPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all HealthAggregationPolicy resources, + regional and global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. 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 compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionHealthAggregationPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.AggregatedListPager: + Contains a list of + HealthAggregationPoliciesScopedList. + 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. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListRegionHealthAggregationPoliciesRequest + ): + request = compute.AggregatedListRegionHealthAggregationPoliciesRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified HealthAggregationPolicy in the + given region. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to delete. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionHealthAggregationPolicyRequest): + request = compute.DeleteRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified HealthAggregationPolicy in the + given region. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to delete. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionHealthAggregationPolicyRequest): + request = compute.DeleteRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicy: + r"""Returns the specified HealthAggregationPolicy + resource in the given region. + + .. 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 compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Get. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to return. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.HealthAggregationPolicy: + Represents a health aggregation + policy. + A health aggregation policy resource + defines a policy to aggregate health. + + For more information, see + Health checks overview. + + """ + # 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. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionHealthAggregationPolicyRequest): + request = compute.GetRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Create a HealthAggregationPolicy in the specified + project in the given region using the parameters that + are included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, health_aggregation_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionHealthAggregationPolicyRequest): + request = compute.InsertRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Create a HealthAggregationPolicy in the specified + project in the given region using the parameters that + are included in the request. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, region, health_aggregation_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionHealthAggregationPolicyRequest): + request = compute.InsertRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListRegionHealthAggregationPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists the HealthAggregationPolicies for a project in + the given region. + + .. 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 compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionHealthAggregationPoliciesRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.List. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.ListPager: + 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. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionHealthAggregationPoliciesRequest): + request = compute.ListRegionHealthAggregationPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[ + Union[compute.PatchRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified regional + HealthAggregationPolicy resource with the data included + in the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + to update. The name must be 1-63 + characters long, and comply with + RFC1035. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + region, + health_aggregation_policy, + health_aggregation_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionHealthAggregationPolicyRequest): + request = compute.PatchRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[ + Union[compute.PatchRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified regional + HealthAggregationPolicy resource with the data included + in the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. + + .. 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 compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + to update. The name must be 1-63 + characters long, and comply with + RFC1035. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + region, + health_aggregation_policy, + health_aggregation_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionHealthAggregationPolicyRequest): + request = compute.PatchRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. 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 compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # 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. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionHealthAggregationPolicyRequest + ): + request = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionHealthAggregationPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionHealthAggregationPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py new file mode 100644 index 000000000000..55862d8b7170 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.HealthAggregationPolicyAggregatedList], + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + response: compute.HealthAggregationPolicyAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListRegionHealthAggregationPoliciesRequest( + request + ) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.HealthAggregationPolicyAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__( + self, + ) -> Iterator[Tuple[str, compute.HealthAggregationPoliciesScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.HealthAggregationPoliciesScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.HealthAggregationPolicyList], + request: compute.ListRegionHealthAggregationPoliciesRequest, + response: compute.HealthAggregationPolicyList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.HealthAggregationPolicyList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionHealthAggregationPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.HealthAggregationPolicyList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.HealthAggregationPolicy]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst new file mode 100644 index 000000000000..09c62d1c2230 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionHealthAggregationPoliciesTransport` is the ABC for all transports. +- public child `RegionHealthAggregationPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionHealthAggregationPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionHealthAggregationPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionHealthAggregationPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py new file mode 100644 index 000000000000..278ca78ce726 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionHealthAggregationPoliciesTransport +from .rest import ( + RegionHealthAggregationPoliciesRestInterceptor, + RegionHealthAggregationPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionHealthAggregationPoliciesTransport]] +_transport_registry["rest"] = RegionHealthAggregationPoliciesRestTransport + +__all__ = ( + "RegionHealthAggregationPoliciesTransport", + "RegionHealthAggregationPoliciesRestTransport", + "RegionHealthAggregationPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py new file mode 100644 index 000000000000..608139124067 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py @@ -0,0 +1,277 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionHealthAggregationPoliciesTransport(abc.ABC): + """Abstract transport class for RegionHealthAggregationPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionHealthAggregationPoliciesRequest], + Union[ + compute.HealthAggregationPolicyAggregatedList, + Awaitable[compute.HealthAggregationPolicyAggregatedList], + ], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionHealthAggregationPolicyRequest], + Union[ + compute.HealthAggregationPolicy, Awaitable[compute.HealthAggregationPolicy] + ], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionHealthAggregationPoliciesRequest], + Union[ + compute.HealthAggregationPolicyList, + Awaitable[compute.HealthAggregationPolicyList], + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionHealthAggregationPolicyRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionHealthAggregationPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py new file mode 100644 index 000000000000..652d0fba9b71 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py @@ -0,0 +1,1811 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionHealthAggregationPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionHealthAggregationPoliciesRestInterceptor: + """Interceptor for RegionHealthAggregationPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionHealthAggregationPoliciesRestTransport. + + .. code-block:: python + class MyCustomRegionHealthAggregationPoliciesInterceptor(RegionHealthAggregationPoliciesRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionHealthAggregationPoliciesRestTransport(interceptor=MyCustomRegionHealthAggregationPoliciesInterceptor()) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListRegionHealthAggregationPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.HealthAggregationPolicyAggregatedList + ) -> compute.HealthAggregationPolicyAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.HealthAggregationPolicyAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicyAggregatedList, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.HealthAggregationPolicy + ) -> compute.HealthAggregationPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.HealthAggregationPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicy, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionHealthAggregationPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionHealthAggregationPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_list( + self, response: compute.HealthAggregationPolicyList + ) -> compute.HealthAggregationPolicyList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.HealthAggregationPolicyList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicyList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionHealthAggregationPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionHealthAggregationPoliciesRestInterceptor + + +class RegionHealthAggregationPoliciesRestTransport( + _BaseRegionHealthAggregationPoliciesRestTransport +): + """REST backend synchronous transport for RegionHealthAggregationPolicies. + + The RegionHealthAggregationPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionHealthAggregationPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = ( + interceptor or RegionHealthAggregationPoliciesRestInterceptor() + ) + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicyAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListRegionHealthAggregationPoliciesRequest): + The request object. A request message for + RegionHealthAggregationPolicies.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicyAggregatedList: + Contains a list of + HealthAggregationPoliciesScopedList. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicyAggregatedList() + pb_resp = compute.HealthAggregationPolicyAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.HealthAggregationPolicyAggregatedList.to_json(response) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Get. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicy: + Represents a health aggregation + policy. + A health aggregation policy resource + defines a policy to aggregate health. + + For more information, see + Health checks overview. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicy() + pb_resp = compute.HealthAggregationPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.HealthAggregationPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionHealthAggregationPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicyList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionHealthAggregationPoliciesRequest): + The request object. A request message for + RegionHealthAggregationPolicies.List. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicyList: + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicyList() + pb_resp = compute.HealthAggregationPolicyList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.HealthAggregationPolicyList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash( + "RegionHealthAggregationPoliciesRestTransport.TestIamPermissions" + ) + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionHealthAggregationPoliciesRequest], + compute.HealthAggregationPolicyAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionHealthAggregationPolicyRequest], + compute.HealthAggregationPolicy, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionHealthAggregationPoliciesRequest], + compute.HealthAggregationPolicyList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionHealthAggregationPolicyRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionHealthAggregationPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py new file mode 100644 index 000000000000..5a5155b99d2f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py @@ -0,0 +1,451 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionHealthAggregationPoliciesTransport + + +class _BaseRegionHealthAggregationPoliciesRestTransport( + RegionHealthAggregationPoliciesTransport +): + """Base REST backend transport for RegionHealthAggregationPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/healthAggregationPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.AggregatedListRegionHealthAggregationPoliciesRequest.pb(request) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies", + "body": "health_aggregation_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionHealthAggregationPoliciesRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + "body": "health_aggregation_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.pb( + request + ) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionHealthAggregationPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py index fb2faa0cacd9..cc4c0f687608 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py @@ -1589,8 +1589,8 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified regional HealthCheckService - resource with the data included in the request. This - method supports PATCH semantics and uses the JSON merge + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1743,8 +1743,8 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional HealthCheckService - resource with the data included in the request. This - method supports PATCH semantics and uses the JSON merge + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py index 0976512c912f..ab380925a2d3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py @@ -566,21 +566,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -878,21 +889,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1193,21 +1215,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py index de12cbe55cfe..827355b5eb7d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py @@ -1065,23 +1065,33 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) - \* - [Global](/compute/docs/reference/rest/beta/healthChecks) - These health check resources can be used for load - balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding - backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) + - [Global](/compute/docs/reference/rest/beta/healthChecks) + + These health check resources can be used for load + balancing and for autohealing VMs in a managed + instance group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type + of load balancer. For details about the type of + health check supported for each load balancer and + corresponding backend type, see Health checks + overview: Load balancer guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in + a MIG can be either regional or global. For more + information, see Set up an application health check + and autohealing. + + For more information, seeHealth checks overview. """ # Create or coerce a protobuf request object. @@ -1582,7 +1592,7 @@ def patch_unary( ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1728,7 +1738,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py index 09f14c2d6493..11d7e7d06e09 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py @@ -606,21 +606,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -771,23 +782,33 @@ def __call__( Returns: ~.compute.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - `Regional `__ - \* - `Global `__ + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - `Regional `__ + - `Global `__ + These health check resources can be used for load balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding + group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type of + load balancer. For details about the type of health + check supported for each load balancer and corresponding backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in a + MIG can be either regional or global. For more + information, see Set up an application health check and + autohealing. + + For more information, seeHealth checks overview. """ @@ -937,21 +958,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1260,21 +1292,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1592,21 +1635,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py index b903ed2a7e4a..f3516940ad4c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py @@ -707,9 +707,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all HealthSource resources (all regional) - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1197,12 +1198,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthSource: - Represents a health source. A health - source resource specifies the source - resources and the health aggregation - policy applied to the source resources - to determine the aggregated health - status. + Represents a health source. + + A health source resource specifies the + source resources and the health + aggregation policy applied to the source + resources to determine the aggregated + health status. """ # Create or coerce a protobuf request object. @@ -1702,9 +1704,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified regional HealthSource resource - with the data included in the request. This method - supports PATCH semantics and uses the JSON merge patch - format and processing rules. + with the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1849,9 +1851,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional HealthSource resource - with the data included in the request. This method - supports PATCH semantics and uses the JSON merge patch - format and processing rules. + with the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py index 267369c2aecc..d28f2fe3ea18 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py @@ -762,21 +762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -925,12 +936,13 @@ def __call__( Returns: ~.compute.HealthSource: - Represents a health source. A health - source resource specifies the source - resources and the health aggregation - policy applied to the source resources - to determine the aggregated health - status. + Represents a health source. + + A health source resource specifies the + source resources and the health + aggregation policy applied to the source + resources to determine the aggregated + health status. """ @@ -1080,21 +1092,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1397,21 +1420,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py index 1efb2fbdddf2..b11d95e49daa 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py @@ -735,10 +735,10 @@ def cancel_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Cancels the specified resize request. Cancelled - resize request no longer waits for the resources to be - provisioned. Cancel is only possible for requests that - are in accepted state. + r"""Cancels the specified resize request. + Cancelled resize request no longer waits for the + resources to be provisioned. Cancel is only possible for + requests that are in accepted state. .. code-block:: python @@ -780,8 +780,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -893,10 +894,10 @@ def cancel( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Cancels the specified resize request. Cancelled - resize request no longer waits for the resources to be - provisioned. Cancel is only possible for requests that - are in accepted state. + r"""Cancels the specified resize request. + Cancelled resize request no longer waits for the + resources to be provisioned. Cancel is only possible for + requests that are in accepted state. .. code-block:: python @@ -938,8 +939,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1121,8 +1123,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1279,8 +1282,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1460,8 +1464,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1475,8 +1480,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. resize_request (str): - The name of the resize request. Name - should conform to RFC1035 or be a + The name of the resize request. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``resize_request`` field @@ -1621,8 +1626,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1782,8 +1788,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1966,8 +1973,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py index 95ee9db44e2b..f42a7db11e1f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py @@ -515,21 +515,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -679,21 +690,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -999,21 +1021,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py index 56bb64cc605e..45561fd517ac 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py @@ -724,17 +724,21 @@ def abandon_instances_unary( instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method - reduces the targetSize of the managed instance group by + reduces thetargetSize of the managed instance group by the number of instances that you abandon. This operation - is marked as DONE when the action is scheduled even if + is marked asDONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning - action with the listmanagedinstances method. If the - group is part of a backend service that has enabled + action with thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the - VM instance is removed or deleted. You can specify a - maximum of 1000 instances with this method per request. + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -896,17 +900,21 @@ def abandon_instances( instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method - reduces the targetSize of the managed instance group by + reduces thetargetSize of the managed instance group by the number of instances that you abandon. This operation - is marked as DONE when the action is scheduled even if + is marked asDONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning - action with the listmanagedinstances method. If the - group is part of a backend service that has enabled + action with thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the - VM instance is removed or deleted. You can specify a - maximum of 1000 instances with this method per request. + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -1451,7 +1459,7 @@ def create_instances_unary( instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the creating or actions with the + the status of thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1493,9 +1501,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - managed instance group is located. It - should conform to RFC1035. + The name of theregion + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1618,7 +1626,7 @@ def create_instances( instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the creating or actions with the + the status of thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1660,9 +1668,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - managed instance group is located. It - should conform to RFC1035. + The name of theregion + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2108,18 +2116,23 @@ def delete_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. The deleteInstances operation is marked DONE - if the deleteInstances request is successful. The + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. + The deleteInstances operation is marked DONE if + the deleteInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the deleting action with - the listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. You can specify a maximum of 1000 - instances with this method per request. + separately verify the status of thedeleting action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -2279,18 +2292,23 @@ def delete_instances( r"""Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. The deleteInstances operation is marked DONE - if the deleteInstances request is successful. The + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. + The deleteInstances operation is marked DONE if + the deleteInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the deleting action with - the listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. You can specify a maximum of 1000 - instances with this method per request. + separately verify the status of thedeleting action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -2892,14 +2910,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ # Create or coerce a protobuf request object. @@ -2974,12 +2995,14 @@ def insert_unary( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - regional managed instance group can contain up to 2000 + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A regional managed instance group can contain up to 2000 instances. .. code-block:: python @@ -3118,12 +3141,14 @@ def insert( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - regional managed instance group can contain up to 2000 + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A regional managed instance group can contain up to 2000 instances. .. code-block:: python @@ -3426,8 +3451,8 @@ def list_errors( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListErrorsPager: r"""Lists all errors thrown by actions on instances for a - given regional managed instance group. The filter and - orderBy query parameters are not supported. + given regional managed instance group. The filter + andorderBy query parameters are not supported. .. code-block:: python @@ -3902,19 +3927,22 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listmanagedinstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with the + listmanagedinstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4067,19 +4095,22 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listmanagedinstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with the + listmanagedinstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4625,12 +4656,16 @@ def recreate_instances_unary( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4794,12 +4829,16 @@ def recreate_instances( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4984,15 +5023,19 @@ def resize_unary( group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5142,15 +5185,19 @@ def resize( group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5325,19 +5372,26 @@ def resize_advanced_unary( ) -> compute.Operation: r"""Resizes the regional managed instance group with advanced configuration options like disabling creation - retries. This is an extended version of the resize - method. If you increase the size, the group creates new + retries. This is an extended version of theresize + method. + + If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5500,19 +5554,26 @@ def resize_advanced( ) -> extended_operation.ExtendedOperation: r"""Resizes the regional managed instance group with advanced configuration options like disabling creation - retries. This is an extended version of the resize - method. If you increase the size, the group creates new + retries. This is an extended version of theresize + method. + + If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5699,22 +5760,26 @@ def resume_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -5872,22 +5937,26 @@ def resume_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -6071,7 +6140,7 @@ def set_auto_healing_policies_unary( ) -> compute.Operation: r"""Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use regionInstanceGroupManagers.patch instead. + UseregionInstanceGroupManagers.patch instead. .. code-block:: python @@ -6234,7 +6303,7 @@ def set_auto_healing_policies( ) -> extended_operation.ExtendedOperation: r"""Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use regionInstanceGroupManagers.patch instead. + UseregionInstanceGroupManagers.patch instead. .. code-block:: python @@ -7109,22 +7178,26 @@ def start_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7282,22 +7355,26 @@ def start_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7482,27 +7559,36 @@ def stop_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7664,27 +7750,36 @@ def stop_instances( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7871,29 +7966,36 @@ def suspend_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8053,29 +8155,36 @@ def suspend_instances( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8413,17 +8522,19 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listmanagedinstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8576,17 +8687,19 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listmanagedinstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py index f117aad7da01..bdabdd726e32 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py @@ -1749,21 +1749,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1924,21 +1935,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2096,21 +2118,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2269,21 +2302,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2434,21 +2478,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2611,21 +2666,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2783,14 +2849,17 @@ def __call__( Returns: ~.compute.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ @@ -2937,21 +3006,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3715,21 +3795,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3888,21 +3979,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4060,21 +4162,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4231,21 +4344,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4396,21 +4520,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4568,21 +4703,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4744,21 +4890,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4916,21 +5073,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5088,21 +5256,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5262,21 +5441,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5434,21 +5624,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5606,21 +5807,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5933,21 +6145,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6106,21 +6329,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py index 3d6d5bef46bd..0095ba1e2046 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py @@ -771,19 +771,28 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py index 0d15d6bbc9fd..1860f127dfcc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py @@ -510,19 +510,28 @@ def __call__( Returns: ~.compute.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ @@ -976,21 +985,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py index 6479817e04e4..04a72177b9a2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py @@ -1073,19 +1073,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - [Global](/compute/docs/reference/rest/beta/instanceTemplates) - \* - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) - You can reuse a global instance template in different - regions whereas you can use a regional instance template - in a specified region only. If you want to reduce - cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - [Global](/compute/docs/reference/rest/beta/instanceTemplates) + - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) + + You can reuse a global instance template in different + regions whereas you can use a regional instance + template in a specified region only. If you want to + reduce cross-region dependency or achieve data + residency, use a regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py index a8f2eb388cd8..aa5d635caf7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py @@ -446,21 +446,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -610,19 +621,25 @@ def __call__( Returns: ~.compute.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - `Global `__ - \* - `Regional `__ + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - `Global `__ + - `Regional `__ + You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ @@ -769,21 +786,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py index 84f2126f6610..cd16e36170c7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py @@ -278,21 +278,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py index e73180d45f84..053299694998 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py @@ -716,7 +716,9 @@ def delete_unary( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -860,7 +862,9 @@ def delete( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -1087,8 +1091,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ # Create or coerce a protobuf request object. @@ -1225,28 +1230,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1819,28 +1832,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py index 322d3dbf2ac5..af62a9392ce8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py @@ -669,21 +669,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -834,8 +845,9 @@ def __call__( Returns: ~.compute.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ @@ -982,26 +994,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1152,21 +1215,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1470,26 +1544,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1645,21 +1770,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py index 8940facd995a..43b50c2c55e0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py @@ -439,21 +439,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -755,21 +766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py index 3daa391a37b1..45d872e83cea 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py @@ -761,9 +761,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -926,9 +926,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1114,9 +1114,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1255,9 +1255,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1423,9 +1423,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1588,9 +1588,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1774,9 +1774,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1799,13 +1799,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. @@ -1919,9 +1920,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2057,9 +2058,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2220,9 +2221,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of theregion + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2362,9 +2363,9 @@ def sample_list_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of theregion + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py index 980763bb1ece..be51849c59a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py @@ -629,21 +629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -800,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -967,21 +989,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,13 +1172,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1292,21 +1326,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py index 90d99ff120d5..c6079dbb92e4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py @@ -2461,28 +2461,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4796,28 +4804,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py index 11a49b583de3..b281f281392a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py @@ -1237,21 +1237,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1407,21 +1418,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1578,21 +1600,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1744,21 +1777,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2362,26 +2406,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2687,21 +2782,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3002,21 +3108,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3172,21 +3289,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3344,21 +3472,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3515,21 +3654,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3681,21 +3831,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3849,26 +4010,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py index 81895ec0e5d1..340515e49ab6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py @@ -1380,8 +1380,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of network policies. To prevent - failure, it's recommended that you set the + r"""Retrieves an aggregated list of network policies. + + To prevent failure, it's recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py index 5d24432bbb11..1b5efe483c7d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py @@ -959,21 +959,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1132,21 +1143,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1455,21 +1477,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2077,21 +2110,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2391,21 +2435,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2564,21 +2619,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2738,21 +2804,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2909,21 +2986,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py index cef548d9cc0b..bae0e6bc2c6f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py @@ -1082,13 +1082,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NotificationEndpoint: - Represents a notification endpoint. A - notification endpoint resource defines + Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive notifications when there are status changes detected by the associated health check service. - For more information, see Health checks - overview. + + For more information, see + Health checks overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py index 82a8d3a598f3..b74dc5430cc4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py @@ -511,21 +511,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -675,13 +686,15 @@ def __call__( Returns: ~.compute.NotificationEndpoint: - Represents a notification endpoint. A - notification endpoint resource defines + Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive notifications when there are status changes detected by the associated health check service. - For more information, see Health checks - overview. + + For more information, see + Health checks overview. """ @@ -828,21 +841,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py index 9ed385b29dc0..a9436ccfd9ed 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py @@ -901,23 +901,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1130,13 +1137,17 @@ def wait( from the ``GET`` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be ``DONE`` or still in progress. - This method is called on a best-effort basis. Specifically: - In - uncommon cases, when the server is overloaded, the request might - return before the default deadline is reached, or might return - after zero seconds. - If the default deadline is reached, there - is no guarantee that the operation is actually done when the - method returns. Be prepared to retry if the operation is not - ``DONE``. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1199,23 +1210,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py index bb3e0769fbda..fc3128e6ffbf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py @@ -596,21 +596,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -907,21 +918,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py index be8e66882ef2..f585530a80a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py @@ -1396,11 +1396,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -2996,7 +2996,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -3149,7 +3150,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py index 91b6f8db2bf6..707a190ef1e9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py @@ -778,21 +778,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -947,21 +958,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1112,11 +1134,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -1414,21 +1436,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1729,21 +1762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1899,21 +1943,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2068,21 +2123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2233,21 +2299,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py index ff282bca188d..d20d54407e77 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py @@ -479,21 +479,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py index c068f0f96eab..1bfc42820b60 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py @@ -708,8 +708,10 @@ def delete_unary( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -849,8 +851,10 @@ def delete( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -1073,10 +1077,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ # Create or coerce a protobuf request object. @@ -1213,28 +1218,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1801,28 +1814,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1905,7 +1926,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a regional snapshot. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -2056,7 +2078,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a regional snapshot. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py index 3a8e57c293ee..396acbda6640 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py @@ -662,21 +662,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -828,10 +839,11 @@ def __call__( Returns: ~.compute.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ @@ -981,26 +993,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1150,21 +1213,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1472,26 +1546,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1646,21 +1771,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py index becde158bc82..232c107efb36 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py @@ -1075,26 +1075,36 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - [Global](/compute/docs/reference/rest/beta/sslCertificates) - \* - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) - The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate + resources: + + - [Global](/compute/docs/reference/rest/beta/sslCertificates) + - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) + + The global SSL certificates (sslCertificates) are + used by: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL + proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use + SSL keys and certificates to secure connections to a + load balancer. For more information, read Creating + and using SSL certificates,SSL certificates quotas + and limits, and Troubleshooting SSL certificates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py index 76e6d437c0da..78bfd70d9d38 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py @@ -504,21 +504,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -667,26 +678,38 @@ def __call__( Returns: ~.compute.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - `Global `__ - \* - `Regional `__ + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use SSL + keys and certificates to secure connections to a load + balancer. For more information, read Creating and using + SSL certificates,SSL certificates quotas and limits, and + Troubleshooting SSL certificates. """ @@ -835,21 +858,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py index 5ba09c85535f..c2557d3766a5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py @@ -1074,6 +1074,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py index ff9791e54943..7ba2e6bb1dc1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py @@ -612,21 +612,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -778,6 +789,7 @@ def __call__( Returns: ~.compute.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application @@ -933,21 +945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1411,21 +1434,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py index 5bd056463808..e7bb1e42798c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py @@ -1074,22 +1074,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) - A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) + + A target HTTP proxy is a component of Google Cloud + HTTP load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py index 300948fb50ff..12fb8efb856c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py @@ -559,21 +559,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -723,22 +734,29 @@ def __call__( Returns: ~.compute.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -885,21 +903,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1200,21 +1229,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py index d5366d3a7e7d..fef15b667c8a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py @@ -1074,22 +1074,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) - A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) + + A target HTTPS proxy is a component of Google Cloud + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1601,7 +1608,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified regional TargetHttpsProxy resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1752,7 +1759,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified regional TargetHttpsProxy resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py index a7f0b71ec773..27c9b3153561 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py @@ -672,21 +672,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -836,22 +847,29 @@ def __call__( Returns: ~.compute.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -998,21 +1016,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1315,21 +1344,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1485,21 +1525,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1659,21 +1710,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py index 5e8b1399f4f6..1f4f14635544 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py @@ -1072,13 +1072,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py index 46ef820e4fd2..89f099417e7a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py @@ -504,21 +504,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -669,13 +680,14 @@ def __call__( Returns: ~.compute.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -822,21 +834,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py index 36a01207799b..73b1802bb215 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py @@ -1058,31 +1058,43 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - [Global](/compute/docs/reference/rest/beta/urlMaps) \* - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) - A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more - information, read URL Map Concepts. + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - [Global](/compute/docs/reference/rest/beta/urlMaps) + - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) + + A URL map resource is a component of certain types of + cloud load balancers and Traffic Director: + + \* urlMaps are used by global external Application + Load Balancers, classic Application Load Balancers, + and cross-region internal Application Load Balancers. + \* regionUrlMaps are used by internal Application + Load Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: + Routing and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing + and traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend + bucket. + + To use the global urlMaps resource, the backend + service must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. + To use the regionUrlMaps resource, the backend + service must have aloadBalancingScheme of + INTERNAL_MANAGED. For more information, read URL Map + Concepts. """ # Create or coerce a protobuf request object. @@ -1447,8 +1459,9 @@ def invalidate_cache_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1599,8 +1612,9 @@ def invalidate_cache( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1911,9 +1925,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2055,9 +2069,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py index c392a8d58537..6b32b1443f94 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py @@ -715,21 +715,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -880,31 +891,40 @@ def __call__( Returns: ~.compute.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - `Global `__ - \* - `Regional `__ + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more + cloud load balancers and Traffic Director: + + - urlMaps are used by global external Application Load + Balancers, classic Application Load Balancers, and + cross-region internal Application Load Balancers. + - regionUrlMaps are used by internal Application Load + Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: Routing + and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing and + traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service + must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To + use the regionUrlMaps resource, the backend service must + have aloadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts. """ @@ -1051,21 +1071,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1224,21 +1255,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1537,21 +1579,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1862,21 +1915,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py index 760f63d1cffa..e67468045c8f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py @@ -692,17 +692,19 @@ def get( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Region: - r"""Returns the specified Region resource. To decrease latency for - this method, you can optionally omit any unneeded information - from the response by using a field mask. This practice is - especially recommended for unused quota information (the - ``quotas`` field). To exclude one or more fields, set your - request's ``fields`` query parameter to only include the fields - you need. For example, to only include the ``id`` and - ``selfLink`` fields, add the query parameter - ``?fields=id,selfLink`` to your request. This method fails if - the quota information is unavailable for the region and if the - organization policy constraint + r"""Returns the specified Region resource. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter + ``?fields=id,selfLink`` to your request. + + This method fails if the quota information is unavailable for + the region and if the organization policy constraint compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the fail-open behaviour when quota information (the ``items.quotas`` field) is unavailable @@ -763,10 +765,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Region: - Represents a Region resource. A - region is a geographical area where a + Represents a Region resource. + + A region is a geographical area where a resource is located. For more - information, read Regions and Zones. + information, readRegions + and Zones. """ # Create or coerce a protobuf request object. @@ -832,16 +836,19 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""Retrieves the list of region resources available to the - specified project. To decrease latency for this method, you can - optionally omit any unneeded information from the response by - using a field mask. This practice is especially recommended for - unused quota information (the ``items.quotas`` field). To - exclude one or more fields, set your request's ``fields`` query - parameter to only include the fields you need. For example, to - only include the ``id`` and ``selfLink`` fields, add the query - parameter ``?fields=id,selfLink`` to your request. This method - fails if the quota information is unavailable for the region and - if the organization policy constraint + specified project. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``items.quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter + ``?fields=id,selfLink`` to your request. + + This method fails if the quota information is unavailable for + the region and if the organization policy constraint compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the fail-open behaviour when quota information (the ``items.quotas`` field) is unavailable diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py index 2aad88796b8b..9af8b178836f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py @@ -324,10 +324,12 @@ def __call__( Returns: ~.compute.Region: - Represents a Region resource. A - region is a geographical area where a + Represents a Region resource. + + A region is a geographical area where a resource is located. For more - information, read Regions and Zones. + information, readRegions + and Zones. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py index 8b8846201892..43ab7cb1ebd8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py @@ -757,8 +757,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -843,6 +843,184 @@ def sample_get(): # Done; return the response. return response + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. 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 compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.GetIamPolicy. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [project, zone, parent_resource, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyReservationBlockRequest): + request = compute.GetIamPolicyReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def list( self, request: Optional[Union[compute.ListReservationBlocksRequest, dict]] = None, @@ -904,8 +1082,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1062,8 +1240,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1232,8 +1410,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1360,6 +1538,368 @@ def error_code(self): # Done; return the response. return response + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + zone_set_nested_policy_request_resource: Optional[ + compute.ZoneSetNestedPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. 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 compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.SetIamPolicy. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + This corresponds to the ``zone_set_nested_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [ + project, + zone, + parent_resource, + resource, + zone_set_nested_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyReservationBlockRequest): + request = compute.SetIamPolicyReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if zone_set_nested_policy_request_resource is not None: + request.zone_set_nested_policy_request_resource = ( + zone_set_nested_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. 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 compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # 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. + flattened_params = [ + project, + zone, + parent_resource, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.TestIamPermissionsReservationBlockRequest): + request = compute.TestIamPermissionsReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "ReservationBlocksClient": return self diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py index 2491ce616a60..56675ee0a65a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), self.list: gapic_v1.method.wrap_method( self.list, default_timeout=None, @@ -153,6 +158,16 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), } def close(self): @@ -176,6 +191,15 @@ def get( ]: raise NotImplementedError() + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyReservationBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + @property def list( self, @@ -197,6 +221,26 @@ def perform_maintenance( ]: raise NotImplementedError() + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyReservationBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationBlockRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + @property def kind(self) -> str: raise NotImplementedError() diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py index d3fcc59b7f91..992febf04609 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py @@ -80,6 +80,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + def pre_list(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -96,6 +104,22 @@ def post_perform_maintenance(self, response): logging.log(f"Received response: {response}") return response + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + transport = ReservationBlocksRestTransport(interceptor=MyCustomReservationBlocksInterceptor()) client = ReservationBlocksClient(transport=transport) @@ -152,6 +176,53 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + def pre_list( self, request: compute.ListReservationBlocksRequest, @@ -251,6 +322,104 @@ def post_perform_maintenance_with_metadata( """ return response, metadata + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + @dataclasses.dataclass class ReservationBlocksRestStub: @@ -491,6 +660,226 @@ def __call__( ) return resp + class _GetIamPolicy( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy, ReservationBlocksRestStub + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyReservationBlockRequest): + The request object. A request message for + ReservationBlocks.GetIamPolicy. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _List( _BaseReservationBlocksRestTransport._BaseList, ReservationBlocksRestStub ): @@ -698,21 +1087,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -815,6 +1215,387 @@ def __call__( ) return resp + class _SetIamPolicy( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy, ReservationBlocksRestStub + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyReservationBlockRequest): + The request object. A request message for + ReservationBlocks.SetIamPolicy. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions, + ReservationBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsReservationBlockRequest): + The request object. A request message for + ReservationBlocks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + @property def get( self, @@ -825,6 +1606,14 @@ def get( # In C++ this would require a dynamic_cast return self._Get(self._session, self._host, self._interceptor) # type: ignore + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyReservationBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + @property def list( self, @@ -845,6 +1634,25 @@ def perform_maintenance( # In C++ this would require a dynamic_cast return self._PerformMaintenance(self._session, self._host, self._interceptor) # type: ignore + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyReservationBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationBlockRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + @property def kind(self) -> str: return "rest" diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py index 85ee107d8cd2..38749b044e9f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py @@ -133,6 +133,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseList: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") @@ -235,5 +281,117 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/setIamPolicy", + "body": "zone_set_nested_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + __all__ = ("_BaseReservationBlocksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py index 0047b8fa6bbc..29c1ceeb0876 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py @@ -843,6 +843,184 @@ def sample_get(): # Done; return the response. return response + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. 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 compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.GetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [project, zone, parent_resource, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyReservationSubBlockRequest): + request = compute.GetIamPolicyReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def list( self, request: Optional[Union[compute.ListReservationSubBlocksRequest, dict]] = None, @@ -1691,6 +1869,370 @@ def error_code(self): # Done; return the response. return response + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + zone_set_nested_policy_request_resource: Optional[ + compute.ZoneSetNestedPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. 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 compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.SetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + This corresponds to the ``zone_set_nested_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # 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. + flattened_params = [ + project, + zone, + parent_resource, + resource, + zone_set_nested_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyReservationSubBlockRequest): + request = compute.SetIamPolicyReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if zone_set_nested_policy_request_resource is not None: + request.zone_set_nested_policy_request_resource = ( + zone_set_nested_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. 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 compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # 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. + flattened_params = [ + project, + zone, + parent_resource, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsReservationSubBlockRequest + ): + request = compute.TestIamPermissionsReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "ReservationSubBlocksClient": return self diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py index 54130a98e961..802196d4e8b1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), self.list: gapic_v1.method.wrap_method( self.list, default_timeout=None, @@ -158,6 +163,16 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), } def close(self): @@ -181,6 +196,15 @@ def get( ]: raise NotImplementedError() + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyReservationSubBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + @property def list( self, @@ -211,6 +235,26 @@ def report_faulty( ]: raise NotImplementedError() + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyReservationSubBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationSubBlockRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + @property def kind(self) -> str: raise NotImplementedError() diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py index 02d99ef25e08..0b259f1a26bf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py @@ -80,6 +80,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + def pre_list(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -104,6 +112,22 @@ def post_report_faulty(self, response): logging.log(f"Received response: {response}") return response + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + transport = ReservationSubBlocksRestTransport(interceptor=MyCustomReservationSubBlocksInterceptor()) client = ReservationSubBlocksClient(transport=transport) @@ -160,6 +184,53 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + def pre_list( self, request: compute.ListReservationSubBlocksRequest, @@ -307,6 +378,104 @@ def post_report_faulty_with_metadata( """ return response, metadata + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + @dataclasses.dataclass class ReservationSubBlocksRestStub: @@ -549,6 +718,227 @@ def __call__( ) return resp + class _GetIamPolicy( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.GetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationSubBlocksRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _List( _BaseReservationSubBlocksRestTransport._BaseList, ReservationSubBlocksRestStub ): @@ -753,21 +1143,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -922,21 +1323,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1037,15 +1449,407 @@ def __call__( ) return resp - @property - def get( - self, - ) -> Callable[ - [compute.GetReservationSubBlockRequest], compute.ReservationSubBlocksGetResponse - ]: - # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. - # In C++ this would require a dynamic_cast - return self._Get(self._session, self._host, self._interceptor) # type: ignore + class _SetIamPolicy( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.SetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationSubBlocksRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + ReservationSubBlocksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def get( + self, + ) -> Callable[ + [compute.GetReservationSubBlockRequest], compute.ReservationSubBlocksGetResponse + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyReservationSubBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore @property def list( @@ -1076,6 +1880,25 @@ def report_faulty( # In C++ this would require a dynamic_cast return self._ReportFaulty(self._session, self._host, self._interceptor) # type: ignore + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyReservationSubBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationSubBlockRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + @property def kind(self) -> str: return "rest" diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py index 3d24818c8d2b..bd9688fea116 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py @@ -133,6 +133,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyReservationSubBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseList: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") @@ -283,5 +329,119 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/setIamPolicy", + "body": "zone_set_nested_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyReservationSubBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsReservationSubBlockRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + __all__ = ("_BaseReservationSubBlocksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py index e97d7c2e04cb..683d8566280b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py @@ -696,8 +696,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of reservations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of reservations. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1170,11 +1171,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Reservation: - Represents a reservation resource. A + Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more - information, read Reserving zonal + information, read Reserving zonal resources. """ @@ -1310,28 +1311,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1401,8 +1410,8 @@ def insert_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Creates a new reservation. For more information, read - Reserving zonal resources. + r"""Creates a new reservation. For more information, + readReserving zonal resources. .. code-block:: python @@ -1531,8 +1540,8 @@ def insert( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Creates a new reservation. For more information, read - Reserving zonal resources. + r"""Creates a new reservation. For more information, + readReserving zonal resources. .. code-block:: python @@ -1874,8 +1883,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -2029,8 +2038,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -2160,7 +2169,7 @@ def resize_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Resizes the reservation (applicable to standalone - reservations only). For more information, read Modifying + reservations only). For more information, readModifying reservations. .. code-block:: python @@ -2310,7 +2319,7 @@ def resize( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the reservation (applicable to standalone - reservations only). For more information, read Modifying + reservations only). For more information, readModifying reservations. .. code-block:: python @@ -2552,28 +2561,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py index e16bf1966e62..22c4eeaf142f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py @@ -974,21 +974,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,11 +1150,11 @@ def __call__( Returns: ~.compute.Reservation: - Represents a reservation resource. A + Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more - information, read Reserving zonal + information, read Reserving zonal resources. """ @@ -1292,26 +1303,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1461,21 +1523,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1778,21 +1851,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1947,21 +2031,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2121,26 +2216,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2451,21 +2597,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py index be2c59dd5a77..17de4a06f9c4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py @@ -704,8 +704,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of resource policies. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of resource policies. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1188,7 +1189,7 @@ def sample_get(): resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can - use them to schedule persistent disk + use them toschedule persistent disk snapshots. """ @@ -1326,28 +1327,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2214,28 +2223,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py index 08cf0b97f39b..3da68170caaf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py @@ -871,21 +871,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1040,7 +1051,7 @@ def __call__( resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can - use them to schedule persistent disk + use them toschedule persistent disk snapshots. """ @@ -1191,26 +1202,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1360,21 +1422,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1681,21 +1754,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1855,26 +1939,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py index 3c149f6d27ad..52cddf1be061 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py @@ -694,9 +694,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of routers. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of routers. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1462,8 +1463,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Router: Represents a Cloud Router resource. + For more information about Cloud Router, - read the Cloud Router overview. + read theCloud Router overview. """ # Create or coerce a protobuf request object. @@ -2792,9 +2794,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2933,9 +2935,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -3406,7 +3408,7 @@ def preview( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.RoutersPreviewResponse: r"""Preview fields auto-generated during router create - and update operations. Calling this method does NOT + andupdate operations. Calling this method does NOT create or update the router. .. code-block:: python @@ -3696,7 +3698,7 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified Router resource with the data - included in the request. This method conforms to PUT + included in the request. This method conforms toPUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message @@ -3841,7 +3843,7 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified Router resource with the data - included in the request. This method conforms to PUT + included in the request. This method conforms toPUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py index 74492e7b9be8..867f6fa2cfae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py @@ -1358,21 +1358,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1521,21 +1532,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1686,8 +1708,9 @@ def __call__( Returns: ~.compute.Router: Represents a Cloud Router resource. + For more information about Cloud Router, - read the Cloud Router overview. + read theCloud Router overview. """ @@ -2438,21 +2461,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3045,21 +3079,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3214,21 +3259,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3694,21 +3750,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3863,21 +3930,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py index 600d9f6d8207..17156ffb2690 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py @@ -1012,12 +1012,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Route: - Represents a Route resource. A route - defines a path from VM instances in the - VPC network to a specific destination. - This destination can be inside or - outside the VPC network. For more - information, read the Routes overview. + Represents a Route resource. + + A route defines a path from VM instances + in the VPC network to a specific + destination. This destination can be + inside or outside the VPC network. For + more information, read theRoutes + overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py index 0ca547155a57..e94080e45b0c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py @@ -484,21 +484,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -644,12 +655,14 @@ def __call__( Returns: ~.compute.Route: - Represents a Route resource. A route - defines a path from VM instances in the - VPC network to a specific destination. - This destination can be inside or - outside the VPC network. For more - information, read the Routes overview. + Represents a Route resource. + + A route defines a path from VM instances + in the VPC network to a specific + destination. This destination can be + inside or outside the VPC network. For + more information, read theRoutes + overview. """ @@ -792,21 +805,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py index b4d404671696..d5f6cf4b43a7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py @@ -991,9 +991,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SecurityPolicy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1442,11 +1443,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -2988,7 +2989,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -3124,7 +3126,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py index c46af44b4785..5b975b99af23 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py @@ -946,21 +946,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1268,21 +1279,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1434,11 +1456,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -1742,21 +1764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2223,21 +2256,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2396,21 +2440,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2564,21 +2619,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2728,21 +2794,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py index 3798d2342968..5885ee3fd60a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py @@ -707,8 +707,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all ServiceAttachment resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1192,13 +1193,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ServiceAttachment: Represents a ServiceAttachment - resource. A service attachment - represents a service that a producer has - exposed. It encapsulates the load - balancer which fronts the service runs - and a list of NAT IP ranges that the - producers uses to represent the - consumers connecting to the service. + resource. + A service attachment represents a + service that a producer has exposed. It + encapsulates the load balancer which + fronts the service runs and a list of + NAT IP ranges that the producers uses to + represent the consumers connecting to + the service. """ # Create or coerce a protobuf request object. @@ -1335,28 +1337,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1851,8 +1861,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified ServiceAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2004,8 +2014,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified ServiceAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2254,28 +2264,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py index 52786c783e30..f02404ee0f4f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py @@ -876,21 +876,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1042,13 +1053,14 @@ def __call__( Returns: ~.compute.ServiceAttachment: Represents a ServiceAttachment - resource. A service attachment - represents a service that a producer has - exposed. It encapsulates the load - balancer which fronts the service runs - and a list of NAT IP ranges that the - producers uses to represent the - consumers connecting to the service. + resource. + A service attachment represents a + service that a producer has exposed. It + encapsulates the load balancer which + fronts the service runs and a list of + NAT IP ranges that the producers uses to + represent the consumers connecting to + the service. """ @@ -1199,26 +1211,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1368,21 +1431,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1689,21 +1763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1866,26 +1951,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py index fffb1caaa93a..9f3b99463b70 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py @@ -478,21 +478,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py index 6c8346a50505..860acac7a2e6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py @@ -695,9 +695,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all of the snapshots in your - project across all regions and global scope. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + project across all regions and global scope. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -823,8 +824,10 @@ def delete_unary( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -952,8 +955,10 @@ def delete( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -1156,10 +1161,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ # Create or coerce a protobuf request object. @@ -1282,28 +1288,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1372,9 +1386,10 @@ def insert_unary( r"""Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of - disks.createSnapshot, as this method supports more - features, such as creating snapshots in a project - different from the source disk project. + disks.createSnapshot, + as this method supports more features, such as creating + snapshots in a project different from the source disk + project. .. code-block:: python @@ -1492,9 +1507,10 @@ def insert( r"""Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of - disks.createSnapshot, as this method supports more - features, such as creating snapshots in a project - different from the source disk project. + disks.createSnapshot, + as this method supports more features, such as creating + snapshots in a project different from the source disk + project. .. code-block:: python @@ -1820,28 +1836,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1915,7 +1939,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a snapshot. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2051,7 +2075,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a snapshot. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py index 93c333231345..3b5372d636bb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py @@ -856,21 +856,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1019,10 +1030,11 @@ def __call__( Returns: ~.compute.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ @@ -1168,26 +1180,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1339,21 +1402,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1654,26 +1728,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1830,21 +1955,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py index 26a1f62ba953..3d270397d3f2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py @@ -704,9 +704,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslCertificate resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1155,26 +1156,36 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - [Global](/compute/docs/reference/rest/beta/sslCertificates) - \* - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) - The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate + resources: + + - [Global](/compute/docs/reference/rest/beta/sslCertificates) + - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) + + The global SSL certificates (sslCertificates) are + used by: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL + proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use + SSL keys and certificates to secure connections to a + load balancer. For more information, read Creating + and using SSL certificates,SSL certificates quotas + and limits, and Troubleshooting SSL certificates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py index 4d17a9fd3a63..785cf92579a7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py @@ -707,21 +707,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -872,26 +883,38 @@ def __call__( Returns: ~.compute.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - `Global `__ - \* - `Regional `__ + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use SSL + keys and certificates to secure connections to a load + balancer. For more information, read Creating and using + SSL certificates,SSL certificates quotas and limits, and + Troubleshooting SSL certificates. """ @@ -1041,21 +1064,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py index 6020125d29a3..b407c736eee0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py @@ -695,9 +695,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslPolicy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1155,6 +1156,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py index a4e2df524f26..031d8edf98b2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py @@ -807,21 +807,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -971,6 +982,7 @@ def __call__( Returns: ~.compute.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application @@ -1122,21 +1134,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1587,21 +1610,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py index 182b995b81b4..9a14ced0fbe6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py @@ -701,8 +701,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of storage pool types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of storage pool types. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py index 0b9361a631dc..cc1acb54b019 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py @@ -696,8 +696,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of storage pools. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of storage pools. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1318,28 +1319,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2056,28 +2065,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py index bc82b4d050a6..779874eea2cb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py @@ -919,21 +919,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1233,26 +1244,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1402,21 +1464,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1870,26 +1943,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2200,21 +2324,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py index a1eec3368a99..08566c214791 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py @@ -694,9 +694,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of subnetworks. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of subnetworks. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1512,13 +1513,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Subnetwork: - Represents a Subnetwork resource. A - subnetwork (also known as a subnet) is a - logical partition of a Virtual Private + Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is + a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. - For more information, read Virtual - Private Cloud (VPC) Network. + For more information, read + Virtual Private Cloud (VPC) Network. """ # Create or coerce a protobuf request object. @@ -1653,28 +1655,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2297,8 +2307,9 @@ def patch_unary( r"""Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field - descriptions. You must specify the current fingerprint - of the subnetwork resource being patched. + descriptions. + You must specify the current fingerprint of the + subnetwork resource being patched. .. code-block:: python @@ -2444,8 +2455,9 @@ def patch( r"""Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field - descriptions. You must specify the current fingerprint - of the subnetwork resource being patched. + descriptions. + You must specify the current fingerprint of the + subnetwork resource being patched. .. code-block:: python @@ -2685,28 +2697,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py index 79b9b6519883..cc211bcf8ff7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py @@ -1031,21 +1031,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1197,21 +1208,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1365,13 +1387,14 @@ def __call__( Returns: ~.compute.Subnetwork: - Represents a Subnetwork resource. A - subnetwork (also known as a subnet) is a - logical partition of a Virtual Private + Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is + a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. - For more information, read Virtual - Private Cloud (VPC) Network. + For more information, read + Virtual Private Cloud (VPC) Network. """ @@ -1519,26 +1542,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1690,21 +1764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2157,21 +2242,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2329,26 +2425,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2510,21 +2657,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py index dedac66d4cb6..5dbf7293c646 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py @@ -1034,13 +1034,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetGrpcProxy: - Represents a Target gRPC Proxy resource. A target gRPC - proxy is a component of load balancers intended for load - balancing gRPC traffic. Only global forwarding rules - with load balancing scheme INTERNAL_SELF_MANAGED can - reference a target gRPC proxy. The target gRPC Proxy - references a URL map that specifies how traffic is - routed to gRPC backend services. + Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers + intended for load balancing gRPC traffic. Only global + forwarding rules with load balancing scheme + INTERNAL_SELF_MANAGED can reference a target gRPC + proxy. The target gRPC Proxy references a URL map + that specifies how traffic is routed to gRPC backend + services. """ # Create or coerce a protobuf request object. @@ -1488,8 +1490,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetGrpcProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1622,8 +1624,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetGrpcProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py index aa70ae21a598..d5f60b2854ae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py @@ -554,21 +554,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -719,13 +730,15 @@ def __call__( Returns: ~.compute.TargetGrpcProxy: - Represents a Target gRPC Proxy resource. A target gRPC - proxy is a component of load balancers intended for load - balancing gRPC traffic. Only global forwarding rules - with load balancing scheme INTERNAL_SELF_MANAGED can - reference a target gRPC proxy. The target gRPC Proxy - references a URL map that specifies how traffic is - routed to gRPC backend services. + Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers + intended for load balancing gRPC traffic. Only global + forwarding rules with load balancing scheme + INTERNAL_SELF_MANAGED can reference a target gRPC proxy. + The target gRPC Proxy references a URL map that + specifies how traffic is routed to gRPC backend + services. """ @@ -875,21 +888,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1198,21 +1222,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py index a0170f9dc42f..526e23ecd3f4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py @@ -707,8 +707,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpProxy resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1158,22 +1159,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) - A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) + + A target HTTP proxy is a component of Google Cloud + HTTP load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1621,8 +1629,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetHttpProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1755,8 +1763,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py index 47abfc63de3b..bdf7990a1de7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py @@ -816,21 +816,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -981,22 +992,29 @@ def __call__( Returns: ~.compute.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -1146,21 +1164,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1469,21 +1498,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1644,21 +1684,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py index 8a36bcdb9ace..0fc0fc6a2d3c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py @@ -707,8 +707,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpsProxy resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1158,22 +1159,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) - A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) + + A target HTTPS proxy is a component of Google Cloud + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1621,8 +1629,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetHttpsProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1755,8 +1763,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpsProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py index 45a51ea43647..f46d40c43d92 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py @@ -1041,21 +1041,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1206,22 +1217,29 @@ def __call__( Returns: ~.compute.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -1371,21 +1389,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1694,21 +1723,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1870,21 +1910,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2042,21 +2093,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2214,21 +2276,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2388,21 +2461,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2557,21 +2641,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py index f86bd26678e9..2cd9c68ede77 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py @@ -703,8 +703,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target instances. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target instances. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1187,13 +1188,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetInstance: Represents a Target Instance - resource. You can use a target instance - to handle traffic for one or more - forwarding rules, which is ideal for - forwarding protocol traffic that is - managed by a single source. For example, - ESP, AH, TCP, or UDP. For more - information, read Target instances. + resource. + You can use a target instance to handle + traffic for one or more forwarding + rules, which is ideal for forwarding + protocol traffic that is managed by a + single source. For example, ESP, AH, + TCP, or UDP. For more information, + readTarget + instances. """ # Create or coerce a protobuf request object. @@ -1697,8 +1700,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified target instance. For more information, see - Google Cloud Armor Overview + specified target instance. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -1854,8 +1857,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified target instance. For more information, see - Google Cloud Armor Overview + specified target instance. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py index 3a257f1e418e..f7be612b3833 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py @@ -764,21 +764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -930,13 +941,15 @@ def __call__( Returns: ~.compute.TargetInstance: Represents a Target Instance - resource. You can use a target instance - to handle traffic for one or more - forwarding rules, which is ideal for - forwarding protocol traffic that is - managed by a single source. For example, - ESP, AH, TCP, or UDP. For more - information, read Target instances. + resource. + You can use a target instance to handle + traffic for one or more forwarding + rules, which is ideal for forwarding + protocol traffic that is managed by a + single source. For example, ESP, AH, + TCP, or UDP. For more information, + readTarget + instances. """ @@ -1086,21 +1099,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1408,21 +1432,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py index f93ca7173bac..d285568cd53d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py @@ -1352,8 +1352,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target pools. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target pools. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1836,13 +1837,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetPool: Represents a Target Pool resource. + Target pools are used with external passthrough Network Load Balancers. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup - target pool. For more information, read - Using target pools. + target pool. For more information, + readUsing target pools. """ # Create or coerce a protobuf request object. @@ -3458,7 +3460,7 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified target pool. For more information, see Google + specified target pool. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -3615,7 +3617,7 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified target pool. For more information, see Google + specified target pool. For more information, seeGoogle Cloud Armor Overview .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py index f55d56c4cafb..9bbef28c9369 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py @@ -942,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1113,21 +1124,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1433,21 +1455,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1597,13 +1630,14 @@ def __call__( Returns: ~.compute.TargetPool: Represents a Target Pool resource. + Target pools are used with external passthrough Network Load Balancers. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup - target pool. For more information, read - Using target pools. + target pool. For more information, + readUsing target pools. """ @@ -1905,21 +1939,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2222,21 +2267,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2393,21 +2449,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2560,21 +2627,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2733,21 +2811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py index 6726e11bef97..238303f02857 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py @@ -1030,13 +1030,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetSslProxy: Represents a Target SSL Proxy - resource. A target SSL proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target SSL proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target SSL proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + SSL proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py index 93cbd153c1d7..bd3912731aae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py @@ -781,21 +781,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -947,13 +958,14 @@ def __call__( Returns: ~.compute.TargetSslProxy: Represents a Target SSL Proxy - resource. A target SSL proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target SSL proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target SSL proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + SSL proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -1103,21 +1115,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1427,21 +1450,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1599,21 +1633,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1770,21 +1815,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1942,21 +1998,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2113,21 +2180,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py index 1c1c58337153..c29a2c365a25 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py @@ -705,9 +705,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetTcpProxy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1157,13 +1158,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py index 8776d66942aa..2d090500f048 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py @@ -819,21 +819,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -985,13 +996,14 @@ def __call__( Returns: ~.compute.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -1141,21 +1153,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1465,21 +1488,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1636,21 +1670,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py index 69966be97039..81a3f6b18a2d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py @@ -706,8 +706,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target VPN gateways. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target VPN gateways. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1184,10 +1185,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetVpnGateway: Represents a Target VPN Gateway - resource. The target VPN gateway - resource represents a Classic Cloud VPN - gateway. For more information, read the - the Cloud VPN Overview. + resource. + The target VPN gateway resource + represents a Classic Cloud VPN gateway. + For more information, read thethe + Cloud VPN Overview. """ # Create or coerce a protobuf request object. @@ -1683,7 +1685,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a TargetVpnGateway. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1834,7 +1836,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a TargetVpnGateway. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py index a824711f3dcc..2e575af6a30f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py @@ -763,21 +763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -929,10 +940,11 @@ def __call__( Returns: ~.compute.TargetVpnGateway: Represents a Target VPN Gateway - resource. The target VPN gateway - resource represents a Classic Cloud VPN - gateway. For more information, read the - the Cloud VPN Overview. + resource. + The target VPN gateway resource + represents a Classic Cloud VPN gateway. + For more information, read thethe + Cloud VPN Overview. """ @@ -1082,21 +1094,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1407,21 +1430,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py index 5e5eada3fe6a..de46cd49e8cf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py @@ -695,9 +695,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all UrlMap resources, regional and global, - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1143,31 +1144,43 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - [Global](/compute/docs/reference/rest/beta/urlMaps) \* - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) - A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more - information, read URL Map Concepts. + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - [Global](/compute/docs/reference/rest/beta/urlMaps) + - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) + + A URL map resource is a component of certain types of + cloud load balancers and Traffic Director: + + \* urlMaps are used by global external Application + Load Balancers, classic Application Load Balancers, + and cross-region internal Application Load Balancers. + \* regionUrlMaps are used by internal Application + Load Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: + Routing and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing + and traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend + bucket. + + To use the global urlMaps resource, the backend + service must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. + To use the regionUrlMaps resource, the backend + service must have aloadBalancingScheme of + INTERNAL_MANAGED. For more information, read URL Map + Concepts. """ # Create or coerce a protobuf request object. @@ -1491,8 +1504,9 @@ def invalidate_cache_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1629,8 +1643,9 @@ def invalidate_cache( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1911,9 +1926,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2042,9 +2057,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py index 4a44fe453241..e0c1358c240c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py @@ -906,21 +906,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1066,31 +1077,40 @@ def __call__( Returns: ~.compute.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - `Global `__ - \* - `Regional `__ + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more + cloud load balancers and Traffic Director: + + - urlMaps are used by global external Application Load + Balancers, classic Application Load Balancers, and + cross-region internal Application Load Balancers. + - regionUrlMaps are used by internal Application Load + Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: Routing + and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing and + traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service + must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To + use the regionUrlMaps resource, the backend service must + have aloadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts. """ @@ -1234,21 +1254,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1403,21 +1434,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1718,21 +1760,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2038,21 +2091,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py index 1851d625901d..989675ced6af 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py @@ -694,8 +694,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of VPN gateways. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of VPN gateways. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1165,13 +1166,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.VpnGateway: - Represents a HA VPN gateway. HA VPN - is a high-availability (HA) Cloud VPN - solution that lets you securely connect - your on-premises network to your Google - Cloud Virtual Private Cloud network - through an IPsec VPN connection in a - single region. For more information + Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud + VPN solution that lets you securely + connect your on-premises network to your + Google Cloud Virtual Private Cloud + network through an IPsec VPN connection + in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies . @@ -1798,7 +1800,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnGateway. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -1949,7 +1951,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnGateway. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py index 701368c1bfdd..a6488b60e624 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py @@ -811,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -974,13 +985,14 @@ def __call__( Returns: ~.compute.VpnGateway: - Represents a HA VPN gateway. HA VPN - is a high-availability (HA) Cloud VPN - solution that lets you securely connect - your on-premises network to your Google - Cloud Virtual Private Cloud network - through an IPsec VPN connection in a - single region. For more information + Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud + VPN solution that lets you securely + connect your on-premises network to your + Google Cloud Virtual Private Cloud + network through an IPsec VPN connection + in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies . @@ -1278,21 +1290,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1593,21 +1616,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py index 56a03dab1395..8d7126e30aff 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py @@ -694,9 +694,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of VPN tunnels. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of VPN tunnels. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1171,8 +1172,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.VpnTunnel: Represents a Cloud VPN Tunnel - resource. For more information about - VPN, read the the Cloud VPN Overview. + resource. + For more information about VPN, read the + the Cloud VPN Overview. """ # Create or coerce a protobuf request object. @@ -1668,7 +1670,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnTunnel. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -1819,7 +1821,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnTunnel. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py index 36676c9e8379..bfe59d9bd95a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py @@ -748,21 +748,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -911,8 +922,9 @@ def __call__( Returns: ~.compute.VpnTunnel: Represents a Cloud VPN Tunnel - resource. For more information about - VPN, read the the Cloud VPN Overview. + resource. + For more information about VPN, read the + the Cloud VPN Overview. """ @@ -1056,21 +1068,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1371,21 +1394,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py index 7426519b9c5d..5cf8825f5e11 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py @@ -1544,9 +1544,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified wire group resource with the - data included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1693,9 +1693,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified wire group resource with the - data included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py index fe65e60ae91c..90642004e18c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py @@ -481,21 +481,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -788,21 +799,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1101,21 +1123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py index 9500dba5e26f..619046471e9a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py @@ -898,23 +898,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1126,13 +1133,18 @@ def wait( retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be ``DONE`` or still in - progress. This method is called on a best-effort basis. - Specifically: - In uncommon cases, when the server is - overloaded, the request might return before the default deadline - is reached, or might return after zero seconds. - If the default - deadline is reached, there is no guarantee that the operation is - actually done when the method returns. Be prepared to retry if - the operation is not ``DONE``. + progress. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1195,23 +1207,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py index f86151cadf0c..1e906f24158f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py @@ -594,21 +594,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -903,21 +914,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py new file mode 100644 index 000000000000..2102bc0bf7fb --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import ZoneVmExtensionPoliciesClient + +__all__ = ("ZoneVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py new file mode 100644 index 000000000000..121a16a9143f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py @@ -0,0 +1,1897 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.zone_vm_extension_policies import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, ZoneVmExtensionPoliciesTransport +from .transports.rest import ZoneVmExtensionPoliciesRestTransport + + +class ZoneVmExtensionPoliciesClientMeta(type): + """Metaclass for the ZoneVmExtensionPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[ZoneVmExtensionPoliciesTransport]] + _transport_registry["rest"] = ZoneVmExtensionPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[ZoneVmExtensionPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class ZoneVmExtensionPoliciesClient(metaclass=ZoneVmExtensionPoliciesClientMeta): + """The ZoneVmExtensionPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ZoneVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ZoneVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> ZoneVmExtensionPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + ZoneVmExtensionPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert == "true", use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + ZoneVmExtensionPoliciesTransport, + Callable[..., ZoneVmExtensionPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the zone vm extension policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,ZoneVmExtensionPoliciesTransport,Callable[..., ZoneVmExtensionPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the ZoneVmExtensionPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = ZoneVmExtensionPoliciesClient._read_environment_variables() + self._client_cert_source = ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = ZoneVmExtensionPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, ZoneVmExtensionPoliciesTransport) + if transport_provided: + # transport is a ZoneVmExtensionPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(ZoneVmExtensionPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or ZoneVmExtensionPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[ZoneVmExtensionPoliciesTransport], + Callable[..., ZoneVmExtensionPoliciesTransport], + ] = ( + ZoneVmExtensionPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., ZoneVmExtensionPoliciesTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "credentialsType": None, + }, + ) + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes a specified zone VM extension policy. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to delete. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteZoneVmExtensionPolicyRequest): + request = compute.DeleteZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes a specified zone VM extension policy. + + .. 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 compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to delete. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteZoneVmExtensionPolicyRequest): + request = compute.DeleteZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetZoneVmExtensionPolicyRequest, dict]] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicy: + r"""Retrieves details of a specific zone VM extension + policy. + + .. 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 compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the VM extension policy + resource to return. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.VmExtensionPolicy: + Represents a VM extension policy. + """ + # 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. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetZoneVmExtensionPolicyRequest): + request = compute.GetZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a new zone-level VM extension policy within a + project. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, zone, vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertZoneVmExtensionPolicyRequest): + request = compute.InsertZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a new zone-level VM extension policy within a + project. + + .. 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 compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [project, zone, vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertZoneVmExtensionPolicyRequest): + request = compute.InsertZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListZoneVmExtensionPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists all VM extension policies within a specific + zone for a project. + + .. 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 compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListZoneVmExtensionPoliciesRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.List. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers.ListPager: + 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. + flattened_params = [project, zone] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListZoneVmExtensionPoliciesRequest): + request = compute.ListZoneVmExtensionPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update_unary( + self, + request: Optional[ + Union[compute.UpdateZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Modifies an existing zone VM extension policy. + + .. 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 compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to update. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + zone, + vm_extension_policy, + vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateZoneVmExtensionPolicyRequest): + request = compute.UpdateZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update( + self, + request: Optional[ + Union[compute.UpdateZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Modifies an existing zone VM extension policy. + + .. 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 compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to update. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # 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. + flattened_params = [ + project, + zone, + vm_extension_policy, + vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + 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." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateZoneVmExtensionPolicyRequest): + request = compute.UpdateZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def __enter__(self) -> "ZoneVmExtensionPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("ZoneVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py new file mode 100644 index 000000000000..ced5c7e591a0 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.VmExtensionPolicyList], + request: compute.ListZoneVmExtensionPoliciesRequest, + response: compute.VmExtensionPolicyList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.VmExtensionPolicyList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListZoneVmExtensionPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.VmExtensionPolicyList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.VmExtensionPolicy]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst new file mode 100644 index 000000000000..35339b868a6f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`ZoneVmExtensionPoliciesTransport` is the ABC for all transports. +- public child `ZoneVmExtensionPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `ZoneVmExtensionPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseZoneVmExtensionPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `ZoneVmExtensionPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py new file mode 100644 index 000000000000..601f34f0d2db --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import ZoneVmExtensionPoliciesTransport +from .rest import ( + ZoneVmExtensionPoliciesRestInterceptor, + ZoneVmExtensionPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[ZoneVmExtensionPoliciesTransport]] +_transport_registry["rest"] = ZoneVmExtensionPoliciesRestTransport + +__all__ = ( + "ZoneVmExtensionPoliciesTransport", + "ZoneVmExtensionPoliciesRestTransport", + "ZoneVmExtensionPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py new file mode 100644 index 000000000000..c441bf2198ee --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py @@ -0,0 +1,239 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import zone_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class ZoneVmExtensionPoliciesTransport(abc.ABC): + """Abstract transport class for ZoneVmExtensionPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.update: gapic_v1.method.wrap_method( + self.update, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetZoneVmExtensionPolicyRequest], + Union[compute.VmExtensionPolicy, Awaitable[compute.VmExtensionPolicy]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListZoneVmExtensionPoliciesRequest], + Union[compute.VmExtensionPolicyList, Awaitable[compute.VmExtensionPolicyList]], + ]: + raise NotImplementedError() + + @property + def update( + self, + ) -> Callable[ + [compute.UpdateZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _zone_operations_client(self) -> zone_operations.ZoneOperationsClient: + ex_op_service = self._extended_operations_services.get("zone_operations") + if not ex_op_service: + ex_op_service = zone_operations.ZoneOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["zone_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("ZoneVmExtensionPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py new file mode 100644 index 000000000000..80bc37f48848 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py @@ -0,0 +1,1328 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseZoneVmExtensionPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class ZoneVmExtensionPoliciesRestInterceptor: + """Interceptor for ZoneVmExtensionPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the ZoneVmExtensionPoliciesRestTransport. + + .. code-block:: python + class MyCustomZoneVmExtensionPoliciesInterceptor(ZoneVmExtensionPoliciesRestInterceptor): + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_update(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_update(self, response): + logging.log(f"Received response: {response}") + return response + + transport = ZoneVmExtensionPoliciesRestTransport(interceptor=MyCustomZoneVmExtensionPoliciesInterceptor()) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + + """ + + def pre_delete( + self, + request: compute.DeleteZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetZoneVmExtensionPolicyRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.VmExtensionPolicy + ) -> compute.VmExtensionPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.VmExtensionPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.VmExtensionPolicy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListZoneVmExtensionPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListZoneVmExtensionPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_list( + self, response: compute.VmExtensionPolicyList + ) -> compute.VmExtensionPolicyList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.VmExtensionPolicyList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.VmExtensionPolicyList, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_update( + self, + request: compute.UpdateZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.UpdateZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for update + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_update(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for update + + DEPRECATED. Please use the `post_update_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_update` interceptor runs + before the `post_update_with_metadata` interceptor. + """ + return response + + def post_update_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for update + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_update_with_metadata` + interceptor in new development instead of the `post_update` interceptor. + When both interceptors are used, this `post_update_with_metadata` interceptor runs after the + `post_update` interceptor. The (possibly modified) response returned by + `post_update` will be passed to + `post_update_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class ZoneVmExtensionPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: ZoneVmExtensionPoliciesRestInterceptor + + +class ZoneVmExtensionPoliciesRestTransport(_BaseZoneVmExtensionPoliciesRestTransport): + """REST backend synchronous transport for ZoneVmExtensionPolicies. + + The ZoneVmExtensionPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[ZoneVmExtensionPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or ZoneVmExtensionPoliciesRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Delete( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicy: + Represents a VM extension policy. + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicy() + pb_resp = compute.VmExtensionPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.VmExtensionPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListZoneVmExtensionPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicyList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListZoneVmExtensionPoliciesRequest): + The request object. A request message for + ZoneVmExtensionPolicies.List. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicyList: + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicyList() + pb_resp = compute.VmExtensionPolicyList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.VmExtensionPolicyList.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Update") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.UpdateZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the update method over HTTP. + + Args: + request (~.compute.UpdateZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_http_options() + ) + + request, metadata = self._interceptor.pre_update(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_transcoded_request( + http_options, request + ) + + body = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Update", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Update", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Update._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_update(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_update_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.update", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Update", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def delete( + self, + ) -> Callable[[compute.DeleteZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[[compute.GetZoneVmExtensionPolicyRequest], compute.VmExtensionPolicy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListZoneVmExtensionPoliciesRequest], compute.VmExtensionPolicyList + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def update( + self, + ) -> Callable[[compute.UpdateZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Update(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("ZoneVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py new file mode 100644 index 000000000000..5527a278d882 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py @@ -0,0 +1,341 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, ZoneVmExtensionPoliciesTransport + + +class _BaseZoneVmExtensionPoliciesRestTransport(ZoneVmExtensionPoliciesTransport): + """Base REST backend transport for ZoneVmExtensionPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies", + "body": "vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListZoneVmExtensionPoliciesRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseUpdate: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + "body": "vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.UpdateZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseZoneVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py index f5103c838bc1..61d6799730f8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py @@ -745,12 +745,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Zone: - Represents a Zone resource. A zone is - a deployment area. These deployment - areas are subsets of a region. For - example the zone us-east1-b is located - in the us-east1 region. For more - information, read Regions and Zones. + Represents a Zone resource. + + A zone is a deployment area. These + deployment areas are subsets of a + region. For example the zone us-east1-b + is located in theus-east1 region. For + more information, readRegions and Zones. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py index 5e005b25be75..5427838e719d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py @@ -322,12 +322,13 @@ def __call__( Returns: ~.compute.Zone: - Represents a Zone resource. A zone is - a deployment area. These deployment - areas are subsets of a region. For - example the zone us-east1-b is located - in the us-east1 region. For more - information, read Regions and Zones. + Represents a Zone resource. + + A zone is a deployment area. These + deployment areas are subsets of a + region. For example the zone us-east1-b + is located in theus-east1 region. For + more information, readRegions and Zones. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py index c235aa673344..09a16aeb4b65 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py @@ -18,6 +18,9 @@ AbandonInstancesRegionInstanceGroupManagerRequest, AcceleratorConfig, Accelerators, + AcceleratorTopologiesInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState, AcceleratorType, AcceleratorTypeAggregatedList, AcceleratorTypeList, @@ -57,12 +60,14 @@ AggregatedListAcceleratorTypesRequest, AggregatedListAddressesRequest, AggregatedListAutoscalersRequest, + AggregatedListBackendBucketsRequest, AggregatedListBackendServicesRequest, AggregatedListDisksRequest, AggregatedListDiskTypesRequest, AggregatedListForwardingRulesRequest, AggregatedListFutureReservationsRequest, AggregatedListGlobalOperationsRequest, + AggregatedListGlobalVmExtensionPoliciesRequest, AggregatedListHealthChecksRequest, AggregatedListInstanceGroupManagersRequest, AggregatedListInstanceGroupsRequest, @@ -81,6 +86,8 @@ AggregatedListPacketMirroringsRequest, AggregatedListPublicDelegatedPrefixesRequest, AggregatedListRegionCommitmentsRequest, + AggregatedListRegionCompositeHealthChecksRequest, + AggregatedListRegionHealthAggregationPoliciesRequest, AggregatedListRegionHealthSourcesRequest, AggregatedListRegionNetworkPoliciesRequest, AggregatedListReservationsRequest, @@ -142,6 +149,7 @@ AWSV4Signature, Backend, BackendBucket, + BackendBucketAggregatedList, BackendBucketCdnPolicy, BackendBucketCdnPolicyBypassCacheOnRequestHeader, BackendBucketCdnPolicyCacheKeyPolicy, @@ -149,6 +157,7 @@ BackendBucketList, BackendBucketListUsable, BackendBucketParams, + BackendBucketsScopedList, BackendBucketUsedBy, BackendCustomMetric, BackendService, @@ -219,6 +228,10 @@ CommitmentList, CommitmentResourceStatus, CommitmentsScopedList, + CompositeHealthCheck, + CompositeHealthCheckAggregatedList, + CompositeHealthCheckList, + CompositeHealthChecksScopedList, ConfidentialInstanceConfig, ConnectionDraining, ConsistentHashLoadBalancerSettings, @@ -290,8 +303,11 @@ DeletePublicAdvertisedPrefixeRequest, DeletePublicDelegatedPrefixeRequest, DeleteRegionAutoscalerRequest, + DeleteRegionBackendBucketRequest, DeleteRegionBackendServiceRequest, + DeleteRegionCompositeHealthCheckRequest, DeleteRegionDiskRequest, + DeleteRegionHealthAggregationPolicyRequest, DeleteRegionHealthCheckRequest, DeleteRegionHealthCheckServiceRequest, DeleteRegionHealthSourceRequest, @@ -342,6 +358,7 @@ DeleteWireGroupRequest, DeleteZoneOperationRequest, DeleteZoneOperationResponse, + DeleteZoneVmExtensionPolicyRequest, Denied, DeprecateImageRequest, DeprecationStatus, @@ -442,6 +459,7 @@ GetAssociationRegionNetworkFirewallPolicyRequest, GetAssociationRegionNetworkPolicyRequest, GetAutoscalerRequest, + GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, GetBackendBucketRequest, GetBackendServiceRequest, GetCrossSiteNetworkRequest, @@ -465,6 +483,7 @@ GetGlobalOperationRequest, GetGlobalOrganizationOperationRequest, GetGlobalPublicDelegatedPrefixeRequest, + GetGlobalVmExtensionPolicyRequest, GetGuestAttributesInstanceRequest, GetHealthBackendServiceRequest, GetHealthCheckRequest, @@ -486,12 +505,15 @@ GetIamPolicyNetworkFirewallPolicyRequest, GetIamPolicyNodeGroupRequest, GetIamPolicyNodeTemplateRequest, + GetIamPolicyRegionBackendBucketRequest, GetIamPolicyRegionBackendServiceRequest, GetIamPolicyRegionDiskRequest, GetIamPolicyRegionInstantSnapshotRequest, GetIamPolicyRegionNetworkFirewallPolicyRequest, GetIamPolicyRegionSnapshotRequest, + GetIamPolicyReservationBlockRequest, GetIamPolicyReservationRequest, + GetIamPolicyReservationSubBlockRequest, GetIamPolicyResourcePolicyRequest, GetIamPolicyServiceAttachmentRequest, GetIamPolicySnapshotRequest, @@ -540,11 +562,14 @@ GetPublicAdvertisedPrefixeRequest, GetPublicDelegatedPrefixeRequest, GetRegionAutoscalerRequest, + GetRegionBackendBucketRequest, GetRegionBackendServiceRequest, GetRegionCommitmentRequest, + GetRegionCompositeHealthCheckRequest, GetRegionDiskRequest, GetRegionDiskSettingRequest, GetRegionDiskTypeRequest, + GetRegionHealthAggregationPolicyRequest, GetRegionHealthCheckRequest, GetRegionHealthCheckServiceRequest, GetRegionHealthSourceRequest, @@ -614,12 +639,21 @@ GetXpnResourcesProjectsRequest, GetZoneOperationRequest, GetZoneRequest, + GetZoneVmExtensionPolicyRequest, GlobalAddressesMoveRequest, GlobalNetworkEndpointGroupsAttachEndpointsRequest, GlobalNetworkEndpointGroupsDetachEndpointsRequest, GlobalOrganizationSetPolicyRequest, GlobalSetLabelsRequest, GlobalSetPolicyRequest, + GlobalVmExtensionPolicy, + GlobalVmExtensionPolicyExtensionPolicy, + GlobalVmExtensionPolicyInstanceSelector, + GlobalVmExtensionPolicyLabelSelector, + GlobalVmExtensionPolicyRolloutOperation, + GlobalVmExtensionPolicyRolloutOperationRolloutInput, + GlobalVmExtensionPolicyRolloutOperationRolloutStatus, + GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata, GroupMaintenanceInfo, GRPCHealthCheck, GRPCTLSHealthCheck, @@ -627,6 +661,10 @@ GuestAttributesEntry, GuestAttributesValue, GuestOsFeature, + HealthAggregationPoliciesScopedList, + HealthAggregationPolicy, + HealthAggregationPolicyAggregatedList, + HealthAggregationPolicyList, HealthCheck, HealthCheckList, HealthCheckLogConfig, @@ -707,9 +745,12 @@ InsertPublicAdvertisedPrefixeRequest, InsertPublicDelegatedPrefixeRequest, InsertRegionAutoscalerRequest, + InsertRegionBackendBucketRequest, InsertRegionBackendServiceRequest, InsertRegionCommitmentRequest, + InsertRegionCompositeHealthCheckRequest, InsertRegionDiskRequest, + InsertRegionHealthAggregationPolicyRequest, InsertRegionHealthCheckRequest, InsertRegionHealthCheckServiceRequest, InsertRegionHealthSourceRequest, @@ -753,6 +794,7 @@ InsertVpnGatewayRequest, InsertVpnTunnelRequest, InsertWireGroupRequest, + InsertZoneVmExtensionPolicyRequest, Instance, InstanceAggregatedList, InstanceConsumptionData, @@ -782,6 +824,8 @@ InstanceGroupManagersCreateInstancesRequest, InstanceGroupManagersDeleteInstancesRequest, InstanceGroupManagersDeletePerInstanceConfigsReq, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo, InstanceGroupManagersListErrorsResponse, InstanceGroupManagersListManagedInstancesResponse, InstanceGroupManagersListPerInstanceConfigsResp, @@ -879,7 +923,12 @@ InterconnectAttachmentGroupsListResponse, InterconnectAttachmentGroupsOperationalStatus, InterconnectAttachmentGroupsOperationalStatusAttachmentStatus, + InterconnectAttachmentL2Forwarding, + InterconnectAttachmentL2ForwardingApplianceMapping, + InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping, + InterconnectAttachmentL2ForwardingGeneveHeader, InterconnectAttachmentList, + InterconnectAttachmentParams, InterconnectAttachmentPartnerMetadata, InterconnectAttachmentPrivateInfo, InterconnectAttachmentsScopedList, @@ -917,6 +966,7 @@ InterconnectMacsecConfigPreSharedKey, InterconnectMacsecPreSharedKey, InterconnectOutageNotification, + InterconnectParams, InterconnectRemoteLocation, InterconnectRemoteLocationConstraints, InterconnectRemoteLocationConstraintsSubnetLengthRange, @@ -1005,10 +1055,13 @@ ListPublicDelegatedPrefixesRequest, ListReferrersInstancesRequest, ListRegionAutoscalersRequest, + ListRegionBackendBucketsRequest, ListRegionBackendServicesRequest, ListRegionCommitmentsRequest, + ListRegionCompositeHealthChecksRequest, ListRegionDisksRequest, ListRegionDiskTypesRequest, + ListRegionHealthAggregationPoliciesRequest, ListRegionHealthCheckServicesRequest, ListRegionHealthChecksRequest, ListRegionHealthSourcesRequest, @@ -1059,6 +1112,7 @@ ListUrlMapsRequest, ListUsableBackendBucketsRequest, ListUsableBackendServicesRequest, + ListUsableRegionBackendBucketsRequest, ListUsableRegionBackendServicesRequest, ListUsableSubnetworksRequest, ListVpnGatewaysRequest, @@ -1067,6 +1121,7 @@ ListXpnHostsProjectsRequest, ListZoneOperationsRequest, ListZonesRequest, + ListZoneVmExtensionPoliciesRequest, LocalDisk, LocalizedMessage, LocationPolicy, @@ -1240,8 +1295,11 @@ PatchPublicAdvertisedPrefixeRequest, PatchPublicDelegatedPrefixeRequest, PatchRegionAutoscalerRequest, + PatchRegionBackendBucketRequest, PatchRegionBackendServiceRequest, + PatchRegionCompositeHealthCheckRequest, PatchRegionDiskSettingRequest, + PatchRegionHealthAggregationPolicyRequest, PatchRegionHealthCheckRequest, PatchRegionHealthCheckServiceRequest, PatchRegionHealthSourceRequest, @@ -1440,6 +1498,7 @@ ResourceStatus, ResourceStatusEffectiveInstanceMetadata, ResourceStatusPhysicalHostTopology, + ResourceStatusReservationConsumptionInfo, ResourceStatusScheduling, ResourceStatusShutdownDetails, ResumeInstanceRequest, @@ -1567,12 +1626,15 @@ SetIamPolicyNetworkFirewallPolicyRequest, SetIamPolicyNodeGroupRequest, SetIamPolicyNodeTemplateRequest, + SetIamPolicyRegionBackendBucketRequest, SetIamPolicyRegionBackendServiceRequest, SetIamPolicyRegionDiskRequest, SetIamPolicyRegionInstantSnapshotRequest, SetIamPolicyRegionNetworkFirewallPolicyRequest, SetIamPolicyRegionSnapshotRequest, + SetIamPolicyReservationBlockRequest, SetIamPolicyReservationRequest, + SetIamPolicyReservationSubBlockRequest, SetIamPolicyResourcePolicyRequest, SetIamPolicyServiceAttachmentRequest, SetIamPolicySnapshotRequest, @@ -1804,9 +1866,12 @@ TestIamPermissionsNodeTemplateRequest, TestIamPermissionsPacketMirroringRequest, TestIamPermissionsRegionAutoscalerRequest, + TestIamPermissionsRegionBackendBucketRequest, TestIamPermissionsRegionBackendServiceRequest, TestIamPermissionsRegionCommitmentRequest, + TestIamPermissionsRegionCompositeHealthCheckRequest, TestIamPermissionsRegionDiskRequest, + TestIamPermissionsRegionHealthAggregationPolicyRequest, TestIamPermissionsRegionHealthCheckRequest, TestIamPermissionsRegionHealthCheckServiceRequest, TestIamPermissionsRegionHealthSourceRequest, @@ -1822,7 +1887,9 @@ TestIamPermissionsRegionTargetHttpsProxyRequest, TestIamPermissionsRegionTargetTcpProxyRequest, TestIamPermissionsRegionUrlMapRequest, + TestIamPermissionsReservationBlockRequest, TestIamPermissionsReservationRequest, + TestIamPermissionsReservationSubBlockRequest, TestIamPermissionsResourcePolicyRequest, TestIamPermissionsRouteRequest, TestIamPermissionsRouterRequest, @@ -1880,6 +1947,7 @@ UpdateShieldedVmConfigInstanceRequest, UpdateStoragePoolRequest, UpdateUrlMapRequest, + UpdateZoneVmExtensionPolicyRequest, UrlMap, UrlMapList, UrlMapReference, @@ -1901,6 +1969,13 @@ VmEndpointNatMappingsInterfaceNatMappings, VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, VmEndpointNatMappingsList, + VmExtensionPoliciesScopedList, + VmExtensionPolicy, + VmExtensionPolicyAggregatedListResponse, + VmExtensionPolicyExtensionPolicy, + VmExtensionPolicyInstanceSelector, + VmExtensionPolicyLabelSelector, + VmExtensionPolicyList, VpnGateway, VpnGatewayAggregatedList, VpnGatewayList, @@ -1943,6 +2018,7 @@ Zone, ZoneList, ZoneSetLabelsRequest, + ZoneSetNestedPolicyRequest, ZoneSetPolicyRequest, ) @@ -1951,6 +2027,9 @@ "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", "Accelerators", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -1990,12 +2069,14 @@ "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDisksRequest", "AggregatedListDiskTypesRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -2014,6 +2095,8 @@ "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -2075,6 +2158,7 @@ "AWSV4Signature", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -2082,6 +2166,7 @@ "BackendBucketList", "BackendBucketListUsable", "BackendBucketParams", + "BackendBucketsScopedList", "BackendBucketUsedBy", "BackendCustomMetric", "BackendService", @@ -2152,6 +2237,10 @@ "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -2223,8 +2312,11 @@ "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -2275,6 +2367,7 @@ "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -2375,6 +2468,7 @@ "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -2398,6 +2492,7 @@ "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -2419,12 +2514,15 @@ "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -2473,11 +2571,14 @@ "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -2547,12 +2648,21 @@ "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesMoveRequest", "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "GlobalNetworkEndpointGroupsDetachEndpointsRequest", "GlobalOrganizationSetPolicyRequest", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GRPCHealthCheck", "GRPCTLSHealthCheck", @@ -2560,6 +2670,10 @@ "GuestAttributesEntry", "GuestAttributesValue", "GuestOsFeature", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -2640,9 +2754,12 @@ "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -2686,6 +2803,7 @@ "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -2715,6 +2833,8 @@ "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -2812,7 +2932,12 @@ "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsScopedList", @@ -2850,6 +2975,7 @@ "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -2938,10 +3064,13 @@ "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDisksRequest", "ListRegionDiskTypesRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -2992,6 +3121,7 @@ "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -3000,6 +3130,7 @@ "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", "ListZonesRequest", + "ListZoneVmExtensionPoliciesRequest", "LocalDisk", "LocalizedMessage", "LocationPolicy", @@ -3173,8 +3304,11 @@ "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -3373,6 +3507,7 @@ "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", @@ -3500,12 +3635,15 @@ "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -3737,9 +3875,12 @@ "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -3755,7 +3896,9 @@ "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -3813,6 +3956,7 @@ "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -3834,6 +3978,13 @@ "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -3876,5 +4027,6 @@ "Zone", "ZoneList", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", ) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py index 9ee42cc40c59..5dbac793e5d7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py @@ -28,6 +28,9 @@ "AbandonInstancesInstanceGroupManagerRequest", "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -68,12 +71,14 @@ "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDiskTypesRequest", "AggregatedListDisksRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -92,6 +97,8 @@ "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -152,6 +159,7 @@ "AutoscalingPolicyScalingSchedule", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -160,6 +168,7 @@ "BackendBucketListUsable", "BackendBucketParams", "BackendBucketUsedBy", + "BackendBucketsScopedList", "BackendCustomMetric", "BackendService", "BackendServiceAggregatedList", @@ -229,6 +238,10 @@ "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -300,8 +313,11 @@ "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -352,6 +368,7 @@ "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -454,6 +471,7 @@ "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -477,6 +495,7 @@ "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -498,12 +517,15 @@ "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -552,11 +574,14 @@ "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -626,12 +651,21 @@ "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesMoveRequest", "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "GlobalNetworkEndpointGroupsDetachEndpointsRequest", "GlobalOrganizationSetPolicyRequest", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GuestAttributes", "GuestAttributesEntry", @@ -640,6 +674,10 @@ "HTTP2HealthCheck", "HTTPHealthCheck", "HTTPSHealthCheck", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -717,9 +755,12 @@ "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -763,6 +804,7 @@ "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -803,6 +845,8 @@ "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -889,7 +933,12 @@ "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsScopedList", @@ -927,6 +976,7 @@ "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -1015,10 +1065,13 @@ "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDiskTypesRequest", "ListRegionDisksRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -1069,6 +1122,7 @@ "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -1076,6 +1130,7 @@ "ListWireGroupsRequest", "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", + "ListZoneVmExtensionPoliciesRequest", "ListZonesRequest", "LocalDisk", "LocalizedMessage", @@ -1250,8 +1305,11 @@ "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -1450,6 +1508,7 @@ "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", @@ -1578,12 +1637,15 @@ "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -1814,9 +1876,12 @@ "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -1832,7 +1897,9 @@ "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -1890,6 +1957,7 @@ "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -1911,6 +1979,13 @@ "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -1953,6 +2028,7 @@ "Zone", "ZoneList", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", }, ) @@ -1976,7 +2052,9 @@ class AWSV4Signature(proto.Message): creating a backend that uses AWS v4 signature authentication, but will not be returned as part of the configuration when queried with a REST - API GET request. @InputOnly + API GET request. + + @InputOnly This field is a member of `oneof`_ ``_access_key``. access_key_id (str): @@ -1993,7 +2071,7 @@ class AWSV4Signature(proto.Message): origin_region (str): The name of the cloud region of your origin. This is a free-form field with the name of the - region your cloud uses to host your origin. For + region your cloud uses to host your origin. For example, "us-east-1" for AWS or "us-ashburn-1" for OCI. @@ -2041,21 +2119,25 @@ class AbandonInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -2105,17 +2187,21 @@ class AbandonInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2160,12 +2246,11 @@ class AcceleratorConfig(proto.Message): accelerator_type (str): Full or partial URL of the accelerator type resource to attach to this instance. For - example: - projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 + example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, - specify only the accelerator name. See GPUs on - Compute Engine for a full list of accelerator - types. + specify only the accelerator name. + See GPUs on Compute Engine + for a full list of accelerator types. This field is a member of `oneof`_ ``_accelerator_type``. """ @@ -2182,19 +2267,121 @@ class AcceleratorConfig(proto.Message): ) +class AcceleratorTopologiesInfo(proto.Message): + r"""Info for accelerator topologies within a densely packed + reservation. + + Attributes: + accelerator_topology_infos (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorTopologiesInfoAcceleratorTopologyInfo]): + Info for each accelerator topology. + """ + + accelerator_topology_infos: MutableSequence[ + "AcceleratorTopologiesInfoAcceleratorTopologyInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=219451401, + message="AcceleratorTopologiesInfoAcceleratorTopologyInfo", + ) + + +class AcceleratorTopologiesInfoAcceleratorTopologyInfo(proto.Message): + r"""Info for a slice of a given topology. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_topology (str): + The accelerator topology. + + This field is a member of `oneof`_ ``_accelerator_topology``. + info_per_topology_states (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState]): + Info for each topology state. + """ + + accelerator_topology: str = proto.Field( + proto.STRING, + number=389323203, + optional=True, + ) + info_per_topology_states: MutableSequence[ + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState" + ] = proto.RepeatedField( + proto.MESSAGE, + number=183777695, + message="AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", + ) + + +class AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState( + proto.Message +): + r"""Info for each topology state. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + count (int): + The number of accelerator topologies in this + state. + + This field is a member of `oneof`_ ``_count``. + state (str): + The state of the accelerator topology. + Check the State enum for the list of possible + values. + + This field is a member of `oneof`_ ``_state``. + """ + + class State(proto.Enum): + r"""The state of the accelerator topology. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + AVAILABLE (442079913): + The accelerator topology is available. + RUNNING (121282975): + The accelerator topology is running. + TOPOLOGY_STATE_UNSPECIFIED (188327545): + The state of the topology is unspecified. + UNHEALTHY (462118084): + The accelerator topology is unhealthy. + """ + UNDEFINED_STATE = 0 + AVAILABLE = 442079913 + RUNNING = 121282975 + TOPOLOGY_STATE_UNSPECIFIED = 188327545 + UNHEALTHY = 462118084 + + count: int = proto.Field( + proto.INT32, + number=94851343, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + + class AcceleratorType(proto.Message): - r"""Represents an Accelerator Type resource. Google Cloud - Platform provides graphics processing units (accelerators) that - you can add to VM instances to improve or accelerate performance - when working with intensive workloads. For more information, - read GPUs on Compute Engine. + r"""Represents an Accelerator Type resource. + + Google Cloud Platform provides graphics processing units + (accelerators) that you can add to VM instances to improve or + accelerate performance when working with intensive workloads. + For more information, readGPUs on Compute Engine. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -2213,8 +2400,8 @@ class AcceleratorType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#acceleratorType for accelerator types. + [Output Only] The type of the resource. + Alwayscompute#acceleratorType for accelerator types. This field is a member of `oneof`_ ``_kind``. maximum_cards_per_instance (int): @@ -2303,15 +2490,15 @@ class AcceleratorTypeAggregatedList(proto.Message): A list of AcceleratorTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#acceleratorTypeAggregatedList for aggregated lists - of accelerator types. + [Output Only] Type of resource. + Alwayscompute#acceleratorTypeAggregatedList for aggregated + lists of accelerator types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -2385,14 +2572,15 @@ class AcceleratorTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorType]): A list of AcceleratorType resources. kind (str): - [Output Only] Type of resource. Always - compute#acceleratorTypeList for lists of accelerator types. + [Output Only] Type of resource. + Alwayscompute#acceleratorTypeList for lists of accelerator + types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -2487,7 +2675,7 @@ class Accelerators(proto.Message): This field is a member of `oneof`_ ``_guest_accelerator_count``. guest_accelerator_type (str): The accelerator type resource name, not a - full URL, e.g. nvidia-tesla-t4. + full URL, e.g.nvidia-tesla-t4. This field is a member of `oneof`_ ``_guest_accelerator_type``. """ @@ -2513,10 +2701,10 @@ class AccessConfig(proto.Message): Attributes: external_ipv6 (str): - Applies to ipv6AccessConfigs only. The first - IPv6 address of the external IPv6 range - associated with this instance, prefix length is - stored in externalIpv6PrefixLength in + Applies to ipv6AccessConfigs only. + The first IPv6 address of the external IPv6 + range associated with this instance, prefix + length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, @@ -2531,8 +2719,8 @@ class AccessConfig(proto.Message): This field is a member of `oneof`_ ``_external_ipv6_prefix_length``. kind (str): - [Output Only] Type of the resource. Always - compute#accessConfig for access configs. + [Output Only] Type of the resource. + Alwayscompute#accessConfig for access configs. This field is a member of `oneof`_ ``_kind``. name (str): @@ -2540,13 +2728,13 @@ class AccessConfig(proto.Message): accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP - or Network Access. In ipv6AccessConfigs, the + orNetwork Access. In ipv6AccessConfigs, the recommend name is External IPv6. This field is a member of `oneof`_ ``_name``. nat_i_p (str): - Applies to accessConfigs (IPv4) only. An - external IP address associated with this + Applies to accessConfigs (IPv4) only. + Anexternal IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared @@ -2558,23 +2746,27 @@ class AccessConfig(proto.Message): network_tier (str): This signifies the networking tier used for configuring this access configuration and can - only take the following values: PREMIUM, - STANDARD. If an AccessConfig is specified - without a valid external IP address, an - ephemeral IP will be created with this - networkTier. If an AccessConfig with a valid - external IP address is specified, it must match - that of the networkTier associated with the - Address resource owning that IP. Check the - NetworkTier enum for the list of possible - values. + only take the following values: + PREMIUM,STANDARD. + + If an AccessConfig is specified without a valid + external IP address, an ephemeral IP will be + created with this networkTier. + + If an AccessConfig with a valid external IP + address is specified, it must match that of the + networkTier associated with the Address resource + owning that IP. + Check the NetworkTier enum for the list of + possible values. This field is a member of `oneof`_ ``_network_tier``. public_ptr_domain_name (str): - The DNS domain name for the public PTR record. You can set - this field only if the ``setPublicPtr`` field is enabled in - accessConfig. If this field is unspecified in - ipv6AccessConfig, a default PTR record will be created for + The DNS domain name for the public PTR record. + + You can set this field only if the ``setPublicPtr`` field is + enabled inaccessConfig. If this field is unspecified + inipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range. This field is a member of `oneof`_ ``_public_ptr_domain_name``. @@ -2586,17 +2778,18 @@ class AccessConfig(proto.Message): set_public_ptr (bool): Specifies whether a public DNS 'PTR' record should be created to map the external IP address - of the instance to a DNS domain name. This field - is not used in ipv6AccessConfig. A default PTR - record will be created if the VM has external - IPv6 range associated. + of the instance to a DNS domain name. + + This field is not used in ipv6AccessConfig. A + default PTR record will be created if the VM has + external IPv6 range associated. This field is a member of `oneof`_ ``_set_public_ptr``. type_ (str): The type of configuration. In accessConfigs (IPv4), the - default and only option is ONE_TO_ONE_NAT. In - ipv6AccessConfigs, the default and only option is - DIRECT_IPV6. Check the Type enum for the list of possible + default and only option is ONE_TO_ONE_NAT. + Inipv6AccessConfigs, the default and only option + isDIRECT_IPV6. Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. @@ -2605,11 +2798,14 @@ class AccessConfig(proto.Message): class NetworkTier(proto.Enum): r"""This signifies the networking tier used for configuring this access configuration and can only take the following values: - PREMIUM, STANDARD. If an AccessConfig is specified without a - valid external IP address, an ephemeral IP will be created with - this networkTier. If an AccessConfig with a valid external IP - address is specified, it must match that of the networkTier - associated with the Address resource owning that IP. + PREMIUM,STANDARD. + + If an AccessConfig is specified without a valid external IP + address, an ephemeral IP will be created with this networkTier. + + If an AccessConfig with a valid external IP address is + specified, it must match that of the networkTier associated with + the Address resource owning that IP. Values: UNDEFINED_NETWORK_TIER (0): @@ -2635,8 +2831,8 @@ class NetworkTier(proto.Enum): class Type(proto.Enum): r"""The type of configuration. In accessConfigs (IPv4), the default and - only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and - only option is DIRECT_IPV6. + only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and + only option isDIRECT_IPV6. Values: UNDEFINED_TYPE (0): @@ -2725,17 +2921,21 @@ class AddAccessConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -2795,17 +2995,21 @@ class AddAssociationFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2858,17 +3062,21 @@ class AddAssociationNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2920,17 +3128,21 @@ class AddAssociationOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -2995,17 +3207,21 @@ class AddAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3066,17 +3282,21 @@ class AddAssociationRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3122,17 +3342,21 @@ class AddHealthCheckTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -3183,17 +3407,21 @@ class AddInstanceTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -3249,22 +3477,26 @@ class AddInstancesInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -3312,17 +3544,21 @@ class AddNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3372,17 +3608,21 @@ class AddNodesNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3431,17 +3671,21 @@ class AddPacketMirroringRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3477,14 +3721,14 @@ class AddPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3496,17 +3740,21 @@ class AddPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3561,17 +3809,21 @@ class AddPeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3615,17 +3867,21 @@ class AddResourcePoliciesDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3677,17 +3933,21 @@ class AddResourcePoliciesInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3739,17 +3999,21 @@ class AddResourcePoliciesRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3795,17 +4059,21 @@ class AddRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3840,14 +4108,14 @@ class AddRuleNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3859,17 +4127,21 @@ class AddRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3917,17 +4189,21 @@ class AddRuleOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -3966,14 +4242,14 @@ class AddRuleRegionNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3987,17 +4263,21 @@ class AddRuleRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -4141,17 +4421,21 @@ class AddSignedUrlKeyBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. signed_url_key_resource (google.cloud.compute_v1beta.types.SignedUrlKey): @@ -4197,17 +4481,21 @@ class AddSignedUrlKeyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. signed_url_key_resource (google.cloud.compute_v1beta.types.SignedUrlKey): @@ -4257,17 +4545,21 @@ class AddTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -4297,11 +4589,15 @@ class AddTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): class Address(proto.Message): - r"""Represents an IP Address resource. Google Compute Engine has two IP - Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + r"""Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -4315,13 +4611,13 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_address``. address_type (str): The type of address to reserve, either - INTERNAL or EXTERNAL. If unspecified, defaults - to EXTERNAL. Check the AddressType enum for the + INTERNAL orEXTERNAL. If unspecified, defaults to + EXTERNAL. Check the AddressType enum for the list of possible values. This field is a member of `oneof`_ ``_address_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -4338,20 +4634,28 @@ class Address(proto.Message): Reference to the source of external IPv4 addresses, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must support enhanced IPv4 - allocations. Use one of the following formats to - specify a PDP when reserving an external IPv4 - address using BYOIP. - Full resource URL, as in - https://www.googleapis.com/compute/v1/projects/projectId/regions/region - /publicDelegatedPrefixes/pdp-name - Partial URL, - as in - - projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name + allocations. + + Use one of the following formats to specify a + PDP when reserving an external IPv4 address + using BYOIP. + + - + Full resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name - - regions/region/publicDelegatedPrefixes/pdp-name + Partial URL, as in + + + - + projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name + - + regions/region/publicDelegatedPrefixes/pdp-name This field is a member of `oneof`_ ``_ip_collection``. ip_version (str): The IP version that will be used by this - address. Valid options are IPV4 or IPV6. Check + address. Valid options areIPV4 or IPV6. Check the IpVersion enum for the list of possible values. @@ -4379,20 +4683,21 @@ class Address(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve an Address. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an Address. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -4403,21 +4708,22 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_name``. network (str): The URL of the network in which to reserve the address. This - field can only be used with INTERNAL type with the - VPC_PEERING purpose. + field can only be used with INTERNAL type with + theVPC_PEERING purpose. This field is a member of `oneof`_ ``_network``. network_tier (str): This signifies the networking tier used for configuring this address and can only take the - following values: PREMIUM or STANDARD. Internal + following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either - Standard or Premium Tier. If this field is not - specified, it is assumed to be PREMIUM. Check - the NetworkTier enum for the list of possible - values. + Standard or Premium Tier. + + If this field is not specified, it is assumed to + be PREMIUM. Check the NetworkTier enum for the + list of possible values. This field is a member of `oneof`_ ``_network_tier``. prefix_length (int): @@ -4427,25 +4733,34 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_prefix_length``. purpose (str): The purpose of this resource, which can be one of the - following values: - GCE_ENDPOINT for addresses that are used - by VM instances, alias IP ranges, load balancers, and - similar resources. - DNS_RESOLVER for a DNS resolver address - in a subnetwork for a Cloud DNS inbound forwarder IP - addresses (regional internal IP address in a subnet of a VPC - network) - VPC_PEERING for global internal IP addresses used - for private services access allocated ranges. - NAT_AUTO for - the regional external IP addresses used by Cloud NAT when - allocating addresses using automatic NAT IP address - allocation. - IPSEC_INTERCONNECT for addresses created from - a private IP range that are reserved for a VLAN attachment - in an *HA VPN over Cloud Interconnect* configuration. These - addresses are regional resources. - - ``SHARED_LOADBALANCER_VIP`` for an internal IP address that - is assigned to multiple internal forwarding rules. - - ``PRIVATE_SERVICE_CONNECT`` for a private network address - that is used to configure Private Service Connect. Only - global internal addresses can use this purpose. Check the - Purpose enum for the list of possible values. + following values: + + :: + + - GCE_ENDPOINT for addresses that are used by VM + instances, alias IP ranges, load balancers, and similar resources. + - DNS_RESOLVER for a DNS resolver address in a subnetwork + for a Cloud DNS inbound + forwarder IP addresses (regional internal IP address in a subnet of + a VPC network) + - VPC_PEERING for global internal IP addresses used for + + private services access allocated ranges. + - NAT_AUTO for the regional external IP addresses used by + Cloud NAT when allocating addresses using + + automatic NAT IP address allocation. + - IPSEC_INTERCONNECT for addresses created from a private + IP range that are reserved for a VLAN attachment in an + *HA VPN over Cloud Interconnect* configuration. These addresses + are regional resources. + - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned + to multiple internal forwarding rules. + - `PRIVATE_SERVICE_CONNECT` for a private network address that is + used to configure Private Service Connect. Only global internal addresses + can use this purpose. + + Check the Purpose enum for the list of possible values. This field is a member of `oneof`_ ``_purpose``. region (str): @@ -4460,20 +4775,20 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): - [Output Only] The status of the address, which can be one of - RESERVING, RESERVED, or IN_USE. An address that is RESERVING - is currently in the process of being reserved. A RESERVED - address is currently reserved and available to use. An - IN_USE address is currently being used by another resource - and is not available. Check the Status enum for the list of - possible values. + [Output Only] The status of the address, which can be one + ofRESERVING, RESERVED, or IN_USE. An address that is + RESERVING is currently in the process of being reserved. A + RESERVED address is currently reserved and available to use. + An IN_USE address is currently being used by another + resource and is not available. Check the Status enum for the + list of possible values. This field is a member of `oneof`_ ``_status``. subnetwork (str): The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with - INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose. + INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose. This field is a member of `oneof`_ ``_subnetwork``. users (MutableSequence[str]): @@ -4482,7 +4797,7 @@ class Address(proto.Message): """ class AddressType(proto.Enum): - r"""The type of address to reserve, either INTERNAL or EXTERNAL. + r"""The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. Values: @@ -4505,7 +4820,7 @@ class AddressType(proto.Enum): class IpVersion(proto.Enum): r"""The IP version that will be used by this address. Valid - options are IPV4 or IPV6. + options areIPV4 or IPV6. Values: UNDEFINED_IP_VERSION (0): @@ -4524,8 +4839,8 @@ class IpVersion(proto.Enum): UNSPECIFIED_VERSION = 21850000 class Ipv6EndpointType(proto.Enum): - r"""The endpoint type of this address, which should be VM or - NETLB. This is used for deciding which type of endpoint this + r"""The endpoint type of this address, which should be VM + or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. Values: @@ -4544,11 +4859,12 @@ class Ipv6EndpointType(proto.Enum): class NetworkTier(proto.Enum): r"""This signifies the networking tier used for configuring this - address and can only take the following values: PREMIUM or - STANDARD. Internal IP addresses are always Premium Tier; global - external IP addresses are always Premium Tier; regional external - IP addresses can be either Standard or Premium Tier. If this - field is not specified, it is assumed to be PREMIUM. + address and can only take the following values: PREMIUM + orSTANDARD. Internal IP addresses are always Premium Tier; + global external IP addresses are always Premium Tier; regional + external IP addresses can be either Standard or Premium Tier. + + If this field is not specified, it is assumed to be PREMIUM. Values: UNDEFINED_NETWORK_TIER (0): @@ -4574,22 +4890,32 @@ class NetworkTier(proto.Enum): class Purpose(proto.Enum): r"""The purpose of this resource, which can be one of the following - values: - GCE_ENDPOINT for addresses that are used by VM instances, - alias IP ranges, load balancers, and similar resources. - - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud - DNS inbound forwarder IP addresses (regional internal IP address in - a subnet of a VPC network) - VPC_PEERING for global internal IP - addresses used for private services access allocated ranges. - - NAT_AUTO for the regional external IP addresses used by Cloud NAT - when allocating addresses using automatic NAT IP address allocation. - - IPSEC_INTERCONNECT for addresses created from a private IP range - that are reserved for a VLAN attachment in an *HA VPN over Cloud - Interconnect* configuration. These addresses are regional resources. - - ``SHARED_LOADBALANCER_VIP`` for an internal IP address that is - assigned to multiple internal forwarding rules. - - ``PRIVATE_SERVICE_CONNECT`` for a private network address that is - used to configure Private Service Connect. Only global internal - addresses can use this purpose. + values: + + :: + + - GCE_ENDPOINT for addresses that are used by VM + instances, alias IP ranges, load balancers, and similar resources. + - DNS_RESOLVER for a DNS resolver address in a subnetwork + for a Cloud DNS inbound + forwarder IP addresses (regional internal IP address in a subnet of + a VPC network) + - VPC_PEERING for global internal IP addresses used for + + private services access allocated ranges. + - NAT_AUTO for the regional external IP addresses used by + Cloud NAT when allocating addresses using + + automatic NAT IP address allocation. + - IPSEC_INTERCONNECT for addresses created from a private + IP range that are reserved for a VLAN attachment in an + *HA VPN over Cloud Interconnect* configuration. These addresses + are regional resources. + - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned + to multiple internal forwarding rules. + - `PRIVATE_SERVICE_CONNECT` for a private network address that is + used to configure Private Service Connect. Only global internal addresses + can use this purpose. Values: UNDEFINED_PURPOSE (0): @@ -4617,7 +4943,7 @@ class Purpose(proto.Enum): PRIVATE_SERVICE_CONNECT (48134724): A private network IP address that can be used to configure Private Service Connect. This - purpose can be specified only for GLOBAL + purpose can be specified only forGLOBAL addresses of Type INTERNAL SERVERLESS (270492508): A regional internal IP address range reserved @@ -4640,8 +4966,8 @@ class Purpose(proto.Enum): VPC_PEERING = 400800170 class Status(proto.Enum): - r"""[Output Only] The status of the address, which can be one of - RESERVING, RESERVED, or IN_USE. An address that is RESERVING is + r"""[Output Only] The status of the address, which can be one + ofRESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available. @@ -4783,15 +5109,15 @@ class AddressAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.AddressesScopedList]): A list of AddressesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#addressAggregatedList for aggregated lists of + [Output Only] Type of resource. + Alwayscompute#addressAggregatedList for aggregated lists of addresses. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -4872,7 +5198,7 @@ class AddressList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -4957,9 +5283,9 @@ class AdvancedMachineFeatures(proto.Message): r"""Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have - corresponding entries in the GuestOsFeatures of an Image (e.g., - whether or not the OS in the Image supports nested - virtualization being enabled or disabled). + corresponding entries in the GuestOsFeatures of anImage (e.g., + whether or not the OS in theImage supports nested virtualization + being enabled or disabled). .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -4991,9 +5317,12 @@ class AdvancedMachineFeatures(proto.Message): This field is a member of `oneof`_ ``_threads_per_core``. turbo_mode (str): Turbo frequency mode to use for the instance. Supported - modes include: \* ALL_CORE_MAX Using empty string or not - setting this field will use the platform-specific default - turbo mode. + modes include: + + - ALL_CORE_MAX + + Using empty string or not setting this field will use the + platform-specific default turbo mode. This field is a member of `oneof`_ ``_turbo_mode``. visible_core_count (int): @@ -5076,42 +5405,69 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5139,13 +5495,17 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5160,10 +5520,11 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5230,42 +5591,69 @@ class AggregatedListAddressesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5293,13 +5681,17 @@ class AggregatedListAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5314,10 +5706,11 @@ class AggregatedListAddressesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5384,42 +5777,69 @@ class AggregatedListAutoscalersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5447,13 +5867,17 @@ class AggregatedListAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5468,10 +5892,11 @@ class AggregatedListAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5524,8 +5949,8 @@ class AggregatedListAutoscalersRequest(proto.Message): ) -class AggregatedListBackendServicesRequest(proto.Message): - r"""A request message for BackendServices.AggregatedList. See the +class AggregatedListBackendBucketsRequest(proto.Message): + r"""A request message for BackendBuckets.AggregatedList. See the method description for details. @@ -5538,42 +5963,69 @@ class AggregatedListBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5601,13 +6053,17 @@ class AggregatedListBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5622,10 +6078,11 @@ class AggregatedListBackendServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5678,8 +6135,8 @@ class AggregatedListBackendServicesRequest(proto.Message): ) -class AggregatedListDiskTypesRequest(proto.Message): - r"""A request message for DiskTypes.AggregatedList. See the +class AggregatedListBackendServicesRequest(proto.Message): + r"""A request message for BackendServices.AggregatedList. See the method description for details. @@ -5692,42 +6149,69 @@ class AggregatedListDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5755,13 +6239,17 @@ class AggregatedListDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5772,14 +6260,15 @@ class AggregatedListDiskTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5832,9 +6321,9 @@ class AggregatedListDiskTypesRequest(proto.Message): ) -class AggregatedListDisksRequest(proto.Message): - r"""A request message for Disks.AggregatedList. See the method - description for details. +class AggregatedListDiskTypesRequest(proto.Message): + r"""A request message for DiskTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -5846,42 +6335,69 @@ class AggregatedListDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5909,13 +6425,17 @@ class AggregatedListDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5930,10 +6450,11 @@ class AggregatedListDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5986,9 +6507,9 @@ class AggregatedListDisksRequest(proto.Message): ) -class AggregatedListForwardingRulesRequest(proto.Message): - r"""A request message for ForwardingRules.AggregatedList. See the - method description for details. +class AggregatedListDisksRequest(proto.Message): + r"""A request message for Disks.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6000,42 +6521,69 @@ class AggregatedListForwardingRulesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6063,13 +6611,17 @@ class AggregatedListForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6084,10 +6636,11 @@ class AggregatedListForwardingRulesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6140,9 +6693,9 @@ class AggregatedListForwardingRulesRequest(proto.Message): ) -class AggregatedListFutureReservationsRequest(proto.Message): - r"""A request message for FutureReservations.AggregatedList. See - the method description for details. +class AggregatedListForwardingRulesRequest(proto.Message): + r"""A request message for ForwardingRules.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6154,42 +6707,69 @@ class AggregatedListFutureReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6217,13 +6797,17 @@ class AggregatedListFutureReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6238,10 +6822,11 @@ class AggregatedListFutureReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6294,8 +6879,8 @@ class AggregatedListFutureReservationsRequest(proto.Message): ) -class AggregatedListGlobalOperationsRequest(proto.Message): - r"""A request message for GlobalOperations.AggregatedList. See +class AggregatedListFutureReservationsRequest(proto.Message): + r"""A request message for FutureReservations.AggregatedList. See the method description for details. @@ -6308,42 +6893,69 @@ class AggregatedListGlobalOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6371,13 +6983,17 @@ class AggregatedListGlobalOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6392,10 +7008,11 @@ class AggregatedListGlobalOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6448,9 +7065,9 @@ class AggregatedListGlobalOperationsRequest(proto.Message): ) -class AggregatedListHealthChecksRequest(proto.Message): - r"""A request message for HealthChecks.AggregatedList. See the - method description for details. +class AggregatedListGlobalOperationsRequest(proto.Message): + r"""A request message for GlobalOperations.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6462,42 +7079,69 @@ class AggregatedListHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6525,13 +7169,17 @@ class AggregatedListHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6542,14 +7190,15 @@ class AggregatedListHealthChecksRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6602,9 +7251,10 @@ class AggregatedListHealthChecksRequest(proto.Message): ) -class AggregatedListInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.AggregatedList. - See the method description for details. +class AggregatedListGlobalVmExtensionPoliciesRequest(proto.Message): + r"""A request message for + GlobalVmExtensionPolicies.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6616,42 +7266,69 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6679,13 +7356,17 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6696,14 +7377,15 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6756,8 +7438,8 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): ) -class AggregatedListInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.AggregatedList. See the +class AggregatedListHealthChecksRequest(proto.Message): + r"""A request message for HealthChecks.AggregatedList. See the method description for details. @@ -6770,42 +7452,69 @@ class AggregatedListInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6833,13 +7542,17 @@ class AggregatedListInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6850,14 +7563,15 @@ class AggregatedListInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6910,9 +7624,9 @@ class AggregatedListInstanceGroupsRequest(proto.Message): ) -class AggregatedListInstanceTemplatesRequest(proto.Message): - r"""A request message for InstanceTemplates.AggregatedList. See - the method description for details. +class AggregatedListInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6924,42 +7638,69 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6987,13 +7728,17 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7004,14 +7749,15 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7064,8 +7810,8 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): ) -class AggregatedListInstancesRequest(proto.Message): - r"""A request message for Instances.AggregatedList. See the +class AggregatedListInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.AggregatedList. See the method description for details. @@ -7078,42 +7824,69 @@ class AggregatedListInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7141,13 +7914,17 @@ class AggregatedListInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7162,10 +7939,11 @@ class AggregatedListInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7218,8 +7996,8 @@ class AggregatedListInstancesRequest(proto.Message): ) -class AggregatedListInstantSnapshotsRequest(proto.Message): - r"""A request message for InstantSnapshots.AggregatedList. See +class AggregatedListInstanceTemplatesRequest(proto.Message): + r"""A request message for InstanceTemplates.AggregatedList. See the method description for details. @@ -7232,42 +8010,69 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7295,13 +8100,17 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7312,14 +8121,15 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7372,9 +8182,9 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): ) -class AggregatedListInterconnectAttachmentsRequest(proto.Message): - r"""A request message for InterconnectAttachments.AggregatedList. - See the method description for details. +class AggregatedListInstancesRequest(proto.Message): + r"""A request message for Instances.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7386,42 +8196,69 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7449,13 +8286,17 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7470,10 +8311,11 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7526,9 +8368,9 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): ) -class AggregatedListMachineTypesRequest(proto.Message): - r"""A request message for MachineTypes.AggregatedList. See the - method description for details. +class AggregatedListInstantSnapshotsRequest(proto.Message): + r"""A request message for InstantSnapshots.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7540,42 +8382,69 @@ class AggregatedListMachineTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7603,13 +8472,17 @@ class AggregatedListMachineTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7624,10 +8497,11 @@ class AggregatedListMachineTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7680,9 +8554,9 @@ class AggregatedListMachineTypesRequest(proto.Message): ) -class AggregatedListNetworkAttachmentsRequest(proto.Message): - r"""A request message for NetworkAttachments.AggregatedList. See - the method description for details. +class AggregatedListInterconnectAttachmentsRequest(proto.Message): + r"""A request message for InterconnectAttachments.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7694,42 +8568,69 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7757,13 +8658,17 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7778,10 +8683,11 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7834,10 +8740,9 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): ) -class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): - r"""A request message for - NetworkEdgeSecurityServices.AggregatedList. See the method - description for details. +class AggregatedListMachineTypesRequest(proto.Message): + r"""A request message for MachineTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7849,42 +8754,69 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7912,13 +8844,17 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7929,14 +8865,15 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7989,9 +8926,9 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): ) -class AggregatedListNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.AggregatedList. - See the method description for details. +class AggregatedListNetworkAttachmentsRequest(proto.Message): + r"""A request message for NetworkAttachments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8003,42 +8940,69 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8066,13 +9030,17 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8087,10 +9055,11 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8143,9 +9112,10 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): ) -class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.AggregatedList. - See the method description for details. +class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): + r"""A request message for + NetworkEdgeSecurityServices.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8157,42 +9127,69 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8220,13 +9217,17 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8237,14 +9238,15 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8297,9 +9299,9 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): ) -class AggregatedListNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.AggregatedList. See the - method description for details. +class AggregatedListNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8311,42 +9313,69 @@ class AggregatedListNodeGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8374,13 +9403,17 @@ class AggregatedListNodeGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8395,10 +9428,11 @@ class AggregatedListNodeGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8451,9 +9485,9 @@ class AggregatedListNodeGroupsRequest(proto.Message): ) -class AggregatedListNodeTemplatesRequest(proto.Message): - r"""A request message for NodeTemplates.AggregatedList. See the - method description for details. +class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8465,42 +9499,69 @@ class AggregatedListNodeTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8528,13 +9589,17 @@ class AggregatedListNodeTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8549,10 +9614,11 @@ class AggregatedListNodeTemplatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8605,8 +9671,8 @@ class AggregatedListNodeTemplatesRequest(proto.Message): ) -class AggregatedListNodeTypesRequest(proto.Message): - r"""A request message for NodeTypes.AggregatedList. See the +class AggregatedListNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.AggregatedList. See the method description for details. @@ -8619,42 +9685,69 @@ class AggregatedListNodeTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8682,13 +9775,17 @@ class AggregatedListNodeTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8703,10 +9800,11 @@ class AggregatedListNodeTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8759,9 +9857,9 @@ class AggregatedListNodeTypesRequest(proto.Message): ) -class AggregatedListPacketMirroringsRequest(proto.Message): - r"""A request message for PacketMirrorings.AggregatedList. See - the method description for details. +class AggregatedListNodeTemplatesRequest(proto.Message): + r"""A request message for NodeTemplates.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8773,42 +9871,69 @@ class AggregatedListPacketMirroringsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8836,13 +9961,17 @@ class AggregatedListPacketMirroringsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8857,10 +9986,11 @@ class AggregatedListPacketMirroringsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8913,9 +10043,9 @@ class AggregatedListPacketMirroringsRequest(proto.Message): ) -class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.AggregatedList. - See the method description for details. +class AggregatedListNodeTypesRequest(proto.Message): + r"""A request message for NodeTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8927,42 +10057,69 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8990,13 +10147,17 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9007,14 +10168,15 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9067,8 +10229,8 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): ) -class AggregatedListRegionCommitmentsRequest(proto.Message): - r"""A request message for RegionCommitments.AggregatedList. See +class AggregatedListPacketMirroringsRequest(proto.Message): + r"""A request message for PacketMirrorings.AggregatedList. See the method description for details. @@ -9081,42 +10243,69 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9144,13 +10333,17 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9165,10 +10358,11 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9221,9 +10415,9 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): ) -class AggregatedListRegionHealthSourcesRequest(proto.Message): - r"""A request message for RegionHealthSources.AggregatedList. See - the method description for details. +class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -9235,42 +10429,69 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9298,13 +10519,17 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9319,10 +10544,11 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9375,9 +10601,9 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): ) -class AggregatedListRegionNetworkPoliciesRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.AggregatedList. - See the method description for details. +class AggregatedListRegionCommitmentsRequest(proto.Message): + r"""A request message for RegionCommitments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -9389,196 +10615,69 @@ class AggregatedListRegionNetworkPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - include_all_scopes (bool): - Indicates whether every visible scope for - each scope type (zone, region, global) should be - included in the response. For new resource types - added after this field, the flag has no effect - as new resource types will always include every - visible scope for each scope type in response. - For resource types which predate this field, if - this flag is omitted or false, only scopes of - the scope types where the resource type is - expected to be found will be included. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_include_all_scopes``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + :: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + labels.owner:* - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_return_partial_success``. - service_project_number (int): - The Shared VPC service project id or service - project number for which aggregated list request - is invoked for subnetworks list-usable api. + :: - This field is a member of `oneof`_ ``_service_project_number``. - """ + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - include_all_scopes: bool = proto.Field( - proto.BOOL, - number=391327988, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - service_project_number: int = proto.Field( - proto.INT64, - number=316757497, - optional=True, - ) - - -class AggregatedListReservationsRequest(proto.Message): - r"""A request message for Reservations.AggregatedList. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9606,13 +10705,17 @@ class AggregatedListReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9627,10 +10730,11 @@ class AggregatedListReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9683,9 +10787,10 @@ class AggregatedListReservationsRequest(proto.Message): ) -class AggregatedListResourcePoliciesRequest(proto.Message): - r"""A request message for ResourcePolicies.AggregatedList. See - the method description for details. +class AggregatedListRegionCompositeHealthChecksRequest(proto.Message): + r"""A request message for + RegionCompositeHealthChecks.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -9697,42 +10802,69 @@ class AggregatedListResourcePoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9760,13 +10892,17 @@ class AggregatedListResourcePoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9777,14 +10913,15 @@ class AggregatedListResourcePoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9837,8 +10974,9 @@ class AggregatedListResourcePoliciesRequest(proto.Message): ) -class AggregatedListRoutersRequest(proto.Message): - r"""A request message for Routers.AggregatedList. See the method +class AggregatedListRegionHealthAggregationPoliciesRequest(proto.Message): + r"""A request message for + RegionHealthAggregationPolicies.AggregatedList. See the method description for details. @@ -9851,42 +10989,69 @@ class AggregatedListRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9914,13 +11079,17 @@ class AggregatedListRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9931,14 +11100,15 @@ class AggregatedListRoutersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9991,8 +11161,8 @@ class AggregatedListRoutersRequest(proto.Message): ) -class AggregatedListSecurityPoliciesRequest(proto.Message): - r"""A request message for SecurityPolicies.AggregatedList. See +class AggregatedListRegionHealthSourcesRequest(proto.Message): + r"""A request message for RegionHealthSources.AggregatedList. See the method description for details. @@ -10005,42 +11175,69 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10068,13 +11265,17 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10089,10 +11290,11 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10145,9 +11347,9 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): ) -class AggregatedListServiceAttachmentsRequest(proto.Message): - r"""A request message for ServiceAttachments.AggregatedList. See - the method description for details. +class AggregatedListRegionNetworkPoliciesRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10159,42 +11361,69 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10222,13 +11451,17 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10239,14 +11472,15 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10299,8 +11533,8 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): ) -class AggregatedListSnapshotsRequest(proto.Message): - r"""A request message for Snapshots.AggregatedList. See the +class AggregatedListReservationsRequest(proto.Message): + r"""A request message for Reservations.AggregatedList. See the method description for details. @@ -10313,42 +11547,69 @@ class AggregatedListSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10376,13 +11637,17 @@ class AggregatedListSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10397,10 +11662,11 @@ class AggregatedListSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10453,9 +11719,9 @@ class AggregatedListSnapshotsRequest(proto.Message): ) -class AggregatedListSslCertificatesRequest(proto.Message): - r"""A request message for SslCertificates.AggregatedList. See the - method description for details. +class AggregatedListResourcePoliciesRequest(proto.Message): + r"""A request message for ResourcePolicies.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10467,42 +11733,69 @@ class AggregatedListSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10530,13 +11823,17 @@ class AggregatedListSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10547,14 +11844,15 @@ class AggregatedListSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10607,9 +11905,9 @@ class AggregatedListSslCertificatesRequest(proto.Message): ) -class AggregatedListSslPoliciesRequest(proto.Message): - r"""A request message for SslPolicies.AggregatedList. See the - method description for details. +class AggregatedListRoutersRequest(proto.Message): + r"""A request message for Routers.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10621,42 +11919,69 @@ class AggregatedListSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10684,13 +12009,17 @@ class AggregatedListSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10701,14 +12030,15 @@ class AggregatedListSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10761,8 +12091,8 @@ class AggregatedListSslPoliciesRequest(proto.Message): ) -class AggregatedListStoragePoolTypesRequest(proto.Message): - r"""A request message for StoragePoolTypes.AggregatedList. See +class AggregatedListSecurityPoliciesRequest(proto.Message): + r"""A request message for SecurityPolicies.AggregatedList. See the method description for details. @@ -10775,42 +12105,69 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10838,13 +12195,17 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10855,14 +12216,15 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10915,9 +12277,9 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): ) -class AggregatedListStoragePoolsRequest(proto.Message): - r"""A request message for StoragePools.AggregatedList. See the - method description for details. +class AggregatedListServiceAttachmentsRequest(proto.Message): + r"""A request message for ServiceAttachments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10929,42 +12291,69 @@ class AggregatedListStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10992,13 +12381,17 @@ class AggregatedListStoragePoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11009,14 +12402,15 @@ class AggregatedListStoragePoolsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11069,8 +12463,8 @@ class AggregatedListStoragePoolsRequest(proto.Message): ) -class AggregatedListSubnetworksRequest(proto.Message): - r"""A request message for Subnetworks.AggregatedList. See the +class AggregatedListSnapshotsRequest(proto.Message): + r"""A request message for Snapshots.AggregatedList. See the method description for details. @@ -11083,42 +12477,69 @@ class AggregatedListSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11146,13 +12567,17 @@ class AggregatedListSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11167,10 +12592,11 @@ class AggregatedListSubnetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11223,9 +12649,9 @@ class AggregatedListSubnetworksRequest(proto.Message): ) -class AggregatedListTargetHttpProxiesRequest(proto.Message): - r"""A request message for TargetHttpProxies.AggregatedList. See - the method description for details. +class AggregatedListSslCertificatesRequest(proto.Message): + r"""A request message for SslCertificates.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11237,42 +12663,69 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11300,13 +12753,17 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11321,10 +12778,11 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11377,9 +12835,9 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): ) -class AggregatedListTargetHttpsProxiesRequest(proto.Message): - r"""A request message for TargetHttpsProxies.AggregatedList. See - the method description for details. +class AggregatedListSslPoliciesRequest(proto.Message): + r"""A request message for SslPolicies.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11391,42 +12849,69 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11454,13 +12939,17 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11475,10 +12964,11 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11531,9 +13021,9 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): ) -class AggregatedListTargetInstancesRequest(proto.Message): - r"""A request message for TargetInstances.AggregatedList. See the - method description for details. +class AggregatedListStoragePoolTypesRequest(proto.Message): + r"""A request message for StoragePoolTypes.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11545,42 +13035,69 @@ class AggregatedListTargetInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11608,13 +13125,17 @@ class AggregatedListTargetInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11629,10 +13150,11 @@ class AggregatedListTargetInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11685,8 +13207,8 @@ class AggregatedListTargetInstancesRequest(proto.Message): ) -class AggregatedListTargetPoolsRequest(proto.Message): - r"""A request message for TargetPools.AggregatedList. See the +class AggregatedListStoragePoolsRequest(proto.Message): + r"""A request message for StoragePools.AggregatedList. See the method description for details. @@ -11699,42 +13221,69 @@ class AggregatedListTargetPoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11762,13 +13311,17 @@ class AggregatedListTargetPoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11783,10 +13336,11 @@ class AggregatedListTargetPoolsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11839,8 +13393,233 @@ class AggregatedListTargetPoolsRequest(proto.Message): ) -class AggregatedListTargetTcpProxiesRequest(proto.Message): - r"""A request message for TargetTcpProxies.AggregatedList. See +class AggregatedListSubnetworksRequest(proto.Message): + r"""A request message for Subnetworks.AggregatedList. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Check the Views enum for the list of possible values. + + This field is a member of `oneof`_ ``_views``. + """ + + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Values: + UNDEFINED_VIEWS (0): + A value indicating that the enum field is not + set. + DEFAULT (115302945): + No description available. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. + """ + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, + ) + views: str = proto.Field( + proto.STRING, + number=112204398, + optional=True, + ) + + +class AggregatedListTargetHttpProxiesRequest(proto.Message): + r"""A request message for TargetHttpProxies.AggregatedList. See the method description for details. @@ -11853,42 +13632,69 @@ class AggregatedListTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11916,13 +13722,17 @@ class AggregatedListTargetTcpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11937,10 +13747,11 @@ class AggregatedListTargetTcpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11993,8 +13804,8 @@ class AggregatedListTargetTcpProxiesRequest(proto.Message): ) -class AggregatedListTargetVpnGatewaysRequest(proto.Message): - r"""A request message for TargetVpnGateways.AggregatedList. See +class AggregatedListTargetHttpsProxiesRequest(proto.Message): + r"""A request message for TargetHttpsProxies.AggregatedList. See the method description for details. @@ -12007,42 +13818,69 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12070,13 +13908,17 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12087,14 +13929,15 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12147,9 +13990,9 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): ) -class AggregatedListUrlMapsRequest(proto.Message): - r"""A request message for UrlMaps.AggregatedList. See the method - description for details. +class AggregatedListTargetInstancesRequest(proto.Message): + r"""A request message for TargetInstances.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -12161,42 +14004,69 @@ class AggregatedListUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12224,13 +14094,17 @@ class AggregatedListUrlMapsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12241,14 +14115,15 @@ class AggregatedListUrlMapsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12301,8 +14176,8 @@ class AggregatedListUrlMapsRequest(proto.Message): ) -class AggregatedListVpnGatewaysRequest(proto.Message): - r"""A request message for VpnGateways.AggregatedList. See the +class AggregatedListTargetPoolsRequest(proto.Message): + r"""A request message for TargetPools.AggregatedList. See the method description for details. @@ -12315,42 +14190,69 @@ class AggregatedListVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12378,13 +14280,17 @@ class AggregatedListVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12399,10 +14305,11 @@ class AggregatedListVpnGatewaysRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12455,9 +14362,9 @@ class AggregatedListVpnGatewaysRequest(proto.Message): ) -class AggregatedListVpnTunnelsRequest(proto.Message): - r"""A request message for VpnTunnels.AggregatedList. See the - method description for details. +class AggregatedListTargetTcpProxiesRequest(proto.Message): + r"""A request message for TargetTcpProxies.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -12469,42 +14376,69 @@ class AggregatedListVpnTunnelsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12532,13 +14466,17 @@ class AggregatedListVpnTunnelsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12549,14 +14487,15 @@ class AggregatedListVpnTunnelsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12609,360 +14548,1107 @@ class AggregatedListVpnTunnelsRequest(proto.Message): ) -class AliasIpRange(proto.Message): - r"""An alias IP range attached to an instance's network - interface. +class AggregatedListTargetVpnGatewaysRequest(proto.Message): + r"""A request message for TargetVpnGateways.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ip_cidr_range (str): - The IP alias ranges to allocate for this - interface. This IP CIDR range must belong to the - specified subnetwork and cannot contain IP - addresses reserved by system or used by other - network interfaces. This range may be a single - IP address (such as 10.2.3.4), a netmask (such - as /24) or a CIDR-formatted string (such as - 10.1.2.0/24). + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_ip_cidr_range``. - subnetwork_range_name (str): - The name of a subnetwork secondary IP range - from which to allocate an IP alias range. If not - specified, the primary range of the subnetwork - is used. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_subnetwork_range_name``. - """ + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - ip_cidr_range: str = proto.Field( - proto.STRING, - number=98117322, - optional=True, - ) - subnetwork_range_name: str = proto.Field( - proto.STRING, - number=387995966, - optional=True, - ) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: -class AllocationAggregateReservation(proto.Message): - r"""This reservation type is specified by total resource amounts - (e.g. total count of CPUs) and can account for multiple instance - SKUs. In other words, one can create instances of varying shapes - against this reservation. + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - Attributes: - host_count (int): - Count of reserved hosts of specified VM - family. The host has fixed number of - accelerators based on the accelerator/vm-family - selected. + :: - This field is a member of `oneof`_ ``_host_count``. - in_use_host_count (int): - Number of hosts currently in use. If there is - one or more Instances running on the host, it is - considered in use. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_in_use_host_count``. - in_use_instance_count (int): - Number of instances currently in use in this - reservation. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_in_use_instance_count``. - in_use_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): - [Output only] List of resources currently in use. - reserved_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): - List of reserved resources (CPUs, memory, - accelerators). - vm_family (str): - The VM family that all instances scheduled - against this reservation must belong to. Check - the VmFamily enum for the list of possible - values. + :: - This field is a member of `oneof`_ ``_vm_family``. - workload_type (str): - The workload type of the instances that will - target this reservation. Check the WorkloadType - enum for the list of possible values. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_workload_type``. - """ + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - class VmFamily(proto.Enum): - r"""The VM family that all instances scheduled against this - reservation must belong to. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - Values: - UNDEFINED_VM_FAMILY (0): - A value indicating that the enum field is not - set. - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): - No description available. - """ - UNDEFINED_VM_FAMILY = 0 - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - class WorkloadType(proto.Enum): - r"""The workload type of the instances that will target this - reservation. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - Values: - UNDEFINED_WORKLOAD_TYPE (0): - A value indicating that the enum field is not - set. - BATCH (62971674): - Reserved resources will be optimized for - BATCH workloads, such as ML training. - SERVING (17781740): - Reserved resources will be optimized for - SERVING workloads, such as ML inference. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_WORKLOAD_TYPE = 0 - BATCH = 62971674 - SERVING = 17781740 - UNSPECIFIED = 526786327 + You cannot combine constraints on multiple fields using + regular expressions. - host_count: int = proto.Field( - proto.INT32, - number=297782200, + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - in_use_host_count: int = proto.Field( - proto.INT32, - number=364069834, + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, optional=True, ) - in_use_instance_count: int = proto.Field( - proto.INT32, - number=319874039, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - in_use_resources: MutableSequence[ - "AllocationAggregateReservationReservedResourceInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=409009107, - message="AllocationAggregateReservationReservedResourceInfo", - ) - reserved_resources: MutableSequence[ - "AllocationAggregateReservationReservedResourceInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=213217742, - message="AllocationAggregateReservationReservedResourceInfo", + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, ) - vm_family: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=125017580, + number=19994697, optional=True, ) - workload_type: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=273432322, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, optional=True, ) -class AllocationAggregateReservationReservedResourceInfo(proto.Message): - r""" +class AggregatedListUrlMapsRequest(proto.Message): + r"""A request message for UrlMaps.AggregatedList. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - accelerator (google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfoAccelerator): - Properties of accelerator resources in this - reservation. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_accelerator``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - accelerator: "AllocationAggregateReservationReservedResourceInfoAccelerator" = ( - proto.Field( - proto.MESSAGE, - number=424338027, - optional=True, - message="AllocationAggregateReservationReservedResourceInfoAccelerator", - ) - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class AllocationAggregateReservationReservedResourceInfoAccelerator(proto.Message): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - accelerator_count (int): - Number of accelerators of specified type. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_accelerator_count``. - accelerator_type (str): - Full or partial URL to accelerator type. e.g. - "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l". + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_accelerator_type``. - """ + :: - accelerator_count: int = proto.Field( - proto.INT32, - number=504879675, - optional=True, - ) - accelerator_type: str = proto.Field( - proto.STRING, - number=138031246, - optional=True, - ) + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: -class AllocationReservationSharingPolicy(proto.Message): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - Attributes: - service_share_type (str): - Sharing config for all Google Cloud services. - Check the ServiceShareType enum for the list of - possible values. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_service_share_type``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - class ServiceShareType(proto.Enum): - r"""Sharing config for all Google Cloud services. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - Values: - UNDEFINED_SERVICE_SHARE_TYPE (0): - A value indicating that the enum field is not - set. - ALLOW_ALL (475536235): - Allow all Google Cloud managed services to - share reservations. - DISALLOW_ALL (277786301): - [Default] Disallow sharing with all Google Cloud services. - SERVICE_SHARE_TYPE_UNSPECIFIED (279057148): - No description available. - """ - UNDEFINED_SERVICE_SHARE_TYPE = 0 - ALLOW_ALL = 475536235 - DISALLOW_ALL = 277786301 - SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148 + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - service_share_type: str = proto.Field( - proto.STRING, - number=514508644, - optional=True, - ) + You cannot combine constraints on multiple fields using + regular expressions. + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. -class AllocationResourceStatus(proto.Message): - r"""[Output Only] Contains output only fields. + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - Attributes: - health_info (google.cloud.compute_v1beta.types.AllocationResourceStatusHealthInfo): - [Output only] Health information for the reservation. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - This field is a member of `oneof`_ ``_health_info``. - reservation_block_count (int): - The number of reservation blocks associated - with this reservation. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_reservation_block_count``. - reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): - Maintenance information for this reservation + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_reservation_maintenance``. - specific_sku_allocation (google.cloud.compute_v1beta.types.AllocationResourceStatusSpecificSKUAllocation): - Allocation Properties of this reservation. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Name of the project scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_specific_sku_allocation``. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. """ - health_info: "AllocationResourceStatusHealthInfo" = proto.Field( - proto.MESSAGE, - number=235287729, + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, - message="AllocationResourceStatusHealthInfo", ) - reservation_block_count: int = proto.Field( - proto.INT32, - number=161835754, + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, optional=True, ) - reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( - proto.MESSAGE, - number=340607776, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, - message="GroupMaintenanceInfo", ) - specific_sku_allocation: "AllocationResourceStatusSpecificSKUAllocation" = ( - proto.Field( - proto.MESSAGE, - number=196231151, - optional=True, - message="AllocationResourceStatusSpecificSKUAllocation", - ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, ) -class AllocationResourceStatusHealthInfo(proto.Message): - r"""Health information for the reservation. +class AggregatedListVpnGatewaysRequest(proto.Message): + r"""A request message for VpnGateways.AggregatedList. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - degraded_block_count (int): - The number of reservation blocks that are - degraded. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_degraded_block_count``. - health_status (str): - The health status of the reservation. - Check the HealthStatus enum for the list of - possible values. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_health_status``. - healthy_block_count (int): - The number of reservation blocks that are - healthy. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_healthy_block_count``. - """ + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - class HealthStatus(proto.Enum): - r"""The health status of the reservation. + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, + ) + + +class AggregatedListVpnTunnelsRequest(proto.Message): + r"""A request message for VpnTunnels.AggregatedList. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, + ) + + +class AliasIpRange(proto.Message): + r"""An alias IP range attached to an instance's network + interface. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + ip_cidr_range (str): + The IP alias ranges to allocate for this + interface. This IP CIDR range must belong to the + specified subnetwork and cannot contain IP + addresses reserved by system or used by other + network interfaces. This range may be a single + IP address (such as 10.2.3.4), a netmask (such + as/24) or a CIDR-formatted string (such + as10.1.2.0/24). + + This field is a member of `oneof`_ ``_ip_cidr_range``. + subnetwork_range_name (str): + The name of a subnetwork secondary IP range + from which to allocate an IP alias range. If not + specified, the primary range of the subnetwork + is used. + + This field is a member of `oneof`_ ``_subnetwork_range_name``. + """ + + ip_cidr_range: str = proto.Field( + proto.STRING, + number=98117322, + optional=True, + ) + subnetwork_range_name: str = proto.Field( + proto.STRING, + number=387995966, + optional=True, + ) + + +class AllocationAggregateReservation(proto.Message): + r"""This reservation type is specified by total resource amounts + (e.g. total count of CPUs) and can account for multiple instance + SKUs. In other words, one can create instances of varying shapes + against this reservation. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + host_count (int): + Count of reserved hosts of specified VM + family. The host has fixed number of + accelerators based on the accelerator/vm-family + selected. + + This field is a member of `oneof`_ ``_host_count``. + in_use_host_count (int): + Number of hosts currently in use. If there is + one or more Instances running on the host, it is + considered in use. + + This field is a member of `oneof`_ ``_in_use_host_count``. + in_use_instance_count (int): + Number of instances currently in use in this + reservation. + + This field is a member of `oneof`_ ``_in_use_instance_count``. + in_use_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): + [Output only] List of resources currently in use. + reserved_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): + List of reserved resources (CPUs, memory, + accelerators). + vm_family (str): + The VM family that all instances scheduled + against this reservation must belong to. + Check the VmFamily enum for the list of possible + values. + + This field is a member of `oneof`_ ``_vm_family``. + workload_type (str): + The workload type of the instances that will + target this reservation. Check the WorkloadType + enum for the list of possible values. + + This field is a member of `oneof`_ ``_workload_type``. + """ + + class VmFamily(proto.Enum): + r"""The VM family that all instances scheduled against this + reservation must belong to. + + Values: + UNDEFINED_VM_FAMILY (0): + A value indicating that the enum field is not + set. + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X (485271888): + No description available. + """ + UNDEFINED_VM_FAMILY = 0 + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X = 485271888 + + class WorkloadType(proto.Enum): + r"""The workload type of the instances that will target this + reservation. + + Values: + UNDEFINED_WORKLOAD_TYPE (0): + A value indicating that the enum field is not + set. + BATCH (62971674): + Reserved resources will be optimized for + BATCH workloads, such as ML training. + SERVING (17781740): + Reserved resources will be optimized for + SERVING workloads, such as ML inference. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_WORKLOAD_TYPE = 0 + BATCH = 62971674 + SERVING = 17781740 + UNSPECIFIED = 526786327 + + host_count: int = proto.Field( + proto.INT32, + number=297782200, + optional=True, + ) + in_use_host_count: int = proto.Field( + proto.INT32, + number=364069834, + optional=True, + ) + in_use_instance_count: int = proto.Field( + proto.INT32, + number=319874039, + optional=True, + ) + in_use_resources: MutableSequence[ + "AllocationAggregateReservationReservedResourceInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=409009107, + message="AllocationAggregateReservationReservedResourceInfo", + ) + reserved_resources: MutableSequence[ + "AllocationAggregateReservationReservedResourceInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=213217742, + message="AllocationAggregateReservationReservedResourceInfo", + ) + vm_family: str = proto.Field( + proto.STRING, + number=125017580, + optional=True, + ) + workload_type: str = proto.Field( + proto.STRING, + number=273432322, + optional=True, + ) + + +class AllocationAggregateReservationReservedResourceInfo(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator (google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfoAccelerator): + Properties of accelerator resources in this + reservation. + + This field is a member of `oneof`_ ``_accelerator``. + """ + + accelerator: "AllocationAggregateReservationReservedResourceInfoAccelerator" = ( + proto.Field( + proto.MESSAGE, + number=424338027, + optional=True, + message="AllocationAggregateReservationReservedResourceInfoAccelerator", + ) + ) + + +class AllocationAggregateReservationReservedResourceInfoAccelerator(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_count (int): + Number of accelerators of specified type. + + This field is a member of `oneof`_ ``_accelerator_count``. + accelerator_type (str): + Full or partial URL to accelerator type. e.g. + "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l". + + This field is a member of `oneof`_ ``_accelerator_type``. + """ + + accelerator_count: int = proto.Field( + proto.INT32, + number=504879675, + optional=True, + ) + accelerator_type: str = proto.Field( + proto.STRING, + number=138031246, + optional=True, + ) + + +class AllocationReservationSharingPolicy(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + service_share_type (str): + Sharing config for all Google Cloud services. + Check the ServiceShareType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_service_share_type``. + """ + + class ServiceShareType(proto.Enum): + r"""Sharing config for all Google Cloud services. + + Values: + UNDEFINED_SERVICE_SHARE_TYPE (0): + A value indicating that the enum field is not + set. + ALLOW_ALL (475536235): + Allow all Google Cloud managed services to + share reservations. + DISALLOW_ALL (277786301): + [Default] Disallow sharing with all Google Cloud services. + SERVICE_SHARE_TYPE_UNSPECIFIED (279057148): + No description available. + """ + UNDEFINED_SERVICE_SHARE_TYPE = 0 + ALLOW_ALL = 475536235 + DISALLOW_ALL = 277786301 + SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148 + + service_share_type: str = proto.Field( + proto.STRING, + number=514508644, + optional=True, + ) + + +class AllocationResourceStatus(proto.Message): + r"""[Output Only] Contains output only fields. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_info (google.cloud.compute_v1beta.types.AllocationResourceStatusHealthInfo): + [Output only] Health information for the reservation. + + This field is a member of `oneof`_ ``_health_info``. + reservation_block_count (int): + The number of reservation blocks associated + with this reservation. + + This field is a member of `oneof`_ ``_reservation_block_count``. + reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): + Maintenance information for this reservation + + This field is a member of `oneof`_ ``_reservation_maintenance``. + specific_sku_allocation (google.cloud.compute_v1beta.types.AllocationResourceStatusSpecificSKUAllocation): + Allocation Properties of this reservation. + + This field is a member of `oneof`_ ``_specific_sku_allocation``. + """ + + health_info: "AllocationResourceStatusHealthInfo" = proto.Field( + proto.MESSAGE, + number=235287729, + optional=True, + message="AllocationResourceStatusHealthInfo", + ) + reservation_block_count: int = proto.Field( + proto.INT32, + number=161835754, + optional=True, + ) + reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( + proto.MESSAGE, + number=340607776, + optional=True, + message="GroupMaintenanceInfo", + ) + specific_sku_allocation: "AllocationResourceStatusSpecificSKUAllocation" = ( + proto.Field( + proto.MESSAGE, + number=196231151, + optional=True, + message="AllocationResourceStatusSpecificSKUAllocation", + ) + ) + + +class AllocationResourceStatusHealthInfo(proto.Message): + r"""Health information for the reservation. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + degraded_block_count (int): + The number of reservation blocks that are + degraded. + + This field is a member of `oneof`_ ``_degraded_block_count``. + health_status (str): + The health status of the reservation. + Check the HealthStatus enum for the list of + possible values. + + This field is a member of `oneof`_ ``_health_status``. + healthy_block_count (int): + The number of reservation blocks that are + healthy. + + This field is a member of `oneof`_ ``_healthy_block_count``. + """ + + class HealthStatus(proto.Enum): + r"""The health status of the reservation. Values: UNDEFINED_HEALTH_STATUS (0): @@ -13041,8 +15727,8 @@ class AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( interface (str): Specifies the disk interface to use for attaching this disk, which is either SCSI or - NVME. The default is SCSI. For performance - characteristics of SCSI over NVMe, see Local SSD + NVME. The default isSCSI. For performance + characteristics of SCSI over NVMe, seeLocal SSD performance. Check the Interface enum for the list of possible values. @@ -13051,8 +15737,8 @@ class AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( class Interface(proto.Enum): r"""Specifies the disk interface to use for attaching this disk, - which is either SCSI or NVME. The default is SCSI. For - performance characteristics of SCSI over NVMe, see Local SSD + which is either SCSI or NVME. The default isSCSI. + For performance characteristics of SCSI over NVMe, seeLocal SSD performance. Values: @@ -13081,7 +15767,9 @@ class Interface(proto.Enum): class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): - r"""Properties of the SKU instances being reserved. Next ID: 9 + r"""Properties of the SKU instances being reserved. + Next ID: 9 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -13093,9 +15781,9 @@ class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): each instance. The type of disk is local-ssd. location_hint (str): An opaque location hint used to place the - allocation close to other resources. This field - is for use by internal tools that use the public - API. + allocation close to other resources. + This field is for use by internal tools that use + the public API. This field is a member of `oneof`_ ``_location_hint``. machine_type (str): @@ -13136,13 +15824,13 @@ class MaintenanceInterval(proto.Enum): and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. + than the PERIODIC andRECURRENT options. PERIODIC (142804635): VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT (194244550): @@ -13150,7 +15838,7 @@ class MaintenanceInterval(proto.Enum): periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. @@ -13201,7 +15889,7 @@ class MaintenanceInterval(proto.Enum): class AllocationSpecificSKUReservation(proto.Message): r"""This reservation type allows to pre allocate specific - instance configuration. + instance configuration. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -13228,14 +15916,19 @@ class AllocationSpecificSKUReservation(proto.Message): source_instance_template (str): Specifies the instance template to create the reservation. If you use this field, you must - exclude the instanceProperties field. This field - is optional, and it can be a full or partial - URL. For example, the following are all valid - URLs to an instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate + exclude the instanceProperties field. + + This field is optional, and it can be a full or + partial URL. For example, the following are all + valid URLs to an instance template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate This field is a member of `oneof`_ ``_source_instance_template``. """ @@ -13281,8 +15974,8 @@ class Allowed(proto.Message): The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp) or the IP - protocol number. + udp,icmp, esp, ah, ipip,sctp) or the IP protocol + number. This field is a member of `oneof`_ ``_I_p_protocol``. ports (MutableSequence[str]): @@ -13290,7 +15983,9 @@ class Allowed(proto.Message): field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any - port. Example inputs include: ["22"], ["80","443"], and + port. + + Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. """ @@ -13323,17 +16018,21 @@ class AnnouncePublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -13367,25 +16066,29 @@ class AnnouncePublicDelegatedPrefixeRequest(proto.Message): The name of the public delegated prefix. It should comply with RFC1035. region (str): - The name of the region where the public - delegated prefix is located. It should comply - with RFC1035. + The name of theregion where + the public delegated prefix is located. It + should comply with RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -13423,9 +16126,9 @@ class ApplyUpdatesToInstancesInstanceGroupManagerRequest(proto.Message): project (str): Project ID for this request. zone (str): - The name of the zone where the managed - instance group is located. Should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + Should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -13510,17 +16213,21 @@ class AttachDiskInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -13578,17 +16285,21 @@ class AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -13635,23 +16346,27 @@ class AttachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ network_endpoint_group: str = proto.Field( @@ -13694,9 +16409,9 @@ class AttachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where you want to - create the network endpoint group. It should - comply with RFC1035. + The name of the region where + you want to create the network endpoint group. + It should comply with RFC1035. region_network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest): The body resource for this request request_id (str): @@ -13704,17 +16419,21 @@ class AttachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -13770,39 +16489,49 @@ class AttachedDisk(proto.Message): This field is a member of `oneof`_ ``_boot``. device_name (str): Specifies a unique device name of your choice that is - reflected into the /dev/disk/by-id/google-\* tree of a Linux + reflected into the/dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and - so on, from within the instance. If not specified, the - server chooses a default device name to apply to this disk, - in the form persistent-disk-x, where x is a number assigned - by Google Compute Engine. This field is only applicable for - persistent disks. + so on, from within the instance. + + If not specified, the server chooses a default device name + to apply to this disk, in the form persistent-disk-x, where + x is a number assigned by Google Compute Engine. This field + is only applicable for persistent disks. This field is a member of `oneof`_ ``_device_name``. disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts or decrypts a disk using a - customer-supplied encryption key. If you are - creating a new disk, this field encrypts the new - disk using an encryption key that you provide. - If you are attaching an existing disk that is - already encrypted, this field decrypts the disk - using the customer-supplied encryption key. If - you encrypt a disk using a customer-supplied + Encrypts or decrypts a disk using + acustomer-supplied encryption key. + + If you are creating a new disk, this field + encrypts the new disk using an encryption key + that you provide. If you are attaching an + existing disk that is already encrypted, this + field decrypts the disk using the + customer-supplied encryption key. + + If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine - instance. If you do not provide an encryption - key, then the disk will be encrypted using an + instance. + + If you do not provide an encryption key, then + the disk will be encrypted using an automatically generated key and you do not need - to provide a key to use the disk later. Note: - Instance templates do not store - customer-supplied encryption keys, so you cannot - use your own keys to encrypt disks in a managed - instance group. You cannot create VMs that have - disks with customer-supplied keys using the bulk + to provide a key to use the disk later. + + Note: + + Instance templates do not storecustomer-supplied + encryption keys, so you cannot use your own keys + to encrypt disks in amanaged instance group. + + You cannot create VMs that have disks with + customer-supplied keys using the bulk insert method. This field is a member of `oneof`_ ``_disk_encryption_key``. @@ -13832,9 +16561,11 @@ class AttachedDisk(proto.Message): [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs - attached to the new instance. This property is mutually - exclusive with the source property; you can only define one - or the other, but not both. + attached to the new instance. + + This property is mutually exclusive with the source + property; you can only define one or the other, but not + both. This field is a member of `oneof`_ ``_initialize_params``. interface (str): @@ -13843,14 +16574,15 @@ class AttachedDisk(proto.Message): NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use - NVMe. For more information, see About persistent - disks. Check the Interface enum for the list of + NVMe. For more information, seeAbout + persistent disks. + Check the Interface enum for the list of possible values. This field is a member of `oneof`_ ``_interface``. kind (str): - [Output Only] Type of the resource. Always - compute#attachedDisk for attached disks. + [Output Only] Type of the resource. + Alwayscompute#attachedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. licenses (MutableSequence[str]): @@ -13867,8 +16599,8 @@ class AttachedDisk(proto.Message): This field is a member of `oneof`_ ``_locked``. mode (str): - The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the + The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values. @@ -13889,21 +16621,25 @@ class AttachedDisk(proto.Message): source (str): Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating - a new instance boot disk, one of - initializeParams.sourceImage or - initializeParams.sourceSnapshot or disks.source - is required. If desired, you can also attach - existing non-root persistent disks using this - property. This field is only applicable for - persistent disks. Note that for - InstanceTemplate, specify the disk name for - zonal disk, and the URL for regional disk. + a new instance boot disk, one + ofinitializeParams.sourceImage + orinitializeParams.sourceSnapshot or + disks.source is required. + + If desired, you can also attach existing + non-root persistent disks using this property. + This field is only applicable for persistent + disks. + + Note that for InstanceTemplate, specify the disk + name for zonal disk, and the URL for regional + disk. This field is a member of `oneof`_ ``_source``. type_ (str): Specifies the type of the disk, either - SCRATCH or PERSISTENT. If not specified, the - default is PERSISTENT. Check the Type enum for + SCRATCH orPERSISTENT. If not specified, the + default isPERSISTENT. Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. @@ -13940,7 +16676,8 @@ class Interface(proto.Enum): which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more - information, see About persistent disks. + information, seeAbout + persistent disks. Values: UNDEFINED_INTERFACE (0): @@ -13956,8 +16693,8 @@ class Interface(proto.Enum): SCSI = 2539686 class Mode(proto.Enum): - r"""The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the disk in + r"""The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Values: @@ -13997,8 +16734,8 @@ class SavedState(proto.Enum): PRESERVED = 254159736 class Type(proto.Enum): - r"""Specifies the type of the disk, either SCRATCH or PERSISTENT. - If not specified, the default is PERSISTENT. + r"""Specifies the type of the disk, either SCRATCH orPERSISTENT. + If not specified, the default isPERSISTENT. Values: UNDEFINED_TYPE (0): @@ -14119,11 +16856,13 @@ class Type(proto.Enum): class AttachedDiskInitializeParams(proto.Message): r"""[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to - create boot disks or local SSDs attached to the new instance. This - field is persisted and returned for instanceTemplate and not - returned in the context of instance. This property is mutually - exclusive with the source property; you can only define one or the - other, but not both. + create boot disks or local SSDs attached to the new instance. + + This field is persisted and returned for instanceTemplate and not + returned in the context of instance. + + This property is mutually exclusive with the source property; you + can only define one or the other, but not both. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -14163,20 +16902,26 @@ class AttachedDiskInitializeParams(proto.Message): instance. If not specified, the default is pd-standard, specified using the full URL. For example: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /diskTypes/pd-standard For a full list of - acceptable values, see Persistent disk types. If - you specify this field when creating a VM, you - can provide either the full or partial URL. For - example, the following values are valid: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /diskTypes/diskType - - projects/project/zones/zone/diskTypes/diskType - - zones/zone/diskTypes/diskType If you specify - this field when creating or updating an instance - template or all-instances configuration, specify - the type of the disk, not the URL. For example: - pd-standard. + + https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard + + For a full list of acceptable values, + seePersistent disk types. If you specify this + field when creating a VM, you can provide either + the full or partial URL. For example, the + following values are valid: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType + - + projects/project/zones/zone/diskTypes/diskType + - zones/zone/diskTypes/diskType + + If you specify this field when creating or + updating an instance template or all-instances + configuration, specify the type of the disk, not + the URL. For example: pd-standard. This field is a member of `oneof`_ ``_disk_type``. enable_confidential_compute (bool): @@ -14189,12 +16934,13 @@ class AttachedDiskInitializeParams(proto.Message): operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. - Guest OS features are applied by merging - initializeParams.guestOsFeatures and - disks.guestOsFeatures + + Guest OS features are applied by + merginginitializeParams.guestOsFeatures + anddisks.guestOsFeatures labels (MutableMapping[str, str]): Labels to apply to this disk. These can be - later modified by the disks.setLabels method. + later modified by thedisks.setLabels method. This field is only applicable for persistent disks. licenses (MutableSequence[str]): @@ -14217,7 +16963,7 @@ class AttachedDiskInitializeParams(proto.Message): disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, - see the Extreme persistent disk documentation. + see theExtreme persistent disk documentation. This field is a member of `oneof`_ ``_provisioned_iops``. provisioned_throughput (int): @@ -14247,35 +16993,48 @@ class AttachedDiskInitializeParams(proto.Message): source_image (str): The source image to create this disk. When creating a new instance boot disk, one of - initializeParams.sourceImage or - initializeParams.sourceSnapshot or disks.source - is required. To create a disk with one of the - public operating system images, specify the - image by its family name. For example, specify - family/debian-9 to use the latest Debian 9 - image: + initializeParams.sourceImage + orinitializeParams.sourceSnapshot or + disks.source is required. + + To create a disk with one of the public + operating system images, specify the image by + its family name. For example, + specifyfamily/debian-9 to use the latest Debian + 9 image: + projects/debian-cloud/global/images/family/debian-9 + Alternatively, use a specific version of a public operating system image: + projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD + To create a disk with a custom image that you created, specify the image name in the following - format: global/images/my-custom-image You can - also specify a custom image by its image family, - which returns the latest version of the image in - that family. Replace the image name with - family/family-name: - global/images/family/my-image-family If the - source image is deleted later, this field will - not be set. + format: + + global/images/my-custom-image + + You can also specify a custom image by its image + family, which returns the latest version of the + image in that family. Replace the image name + with family/family-name: + + global/images/family/my-image-family + + If the source image is deleted later, this field + will not be set. This field is a member of `oneof`_ ``_source_image``. source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source image. Required if the source image is - protected by a customer-supplied encryption key. + Thecustomer-supplied + encryption key of the source image. Required if + the source image is protected by a + customer-supplied encryption key. + InstanceTemplate and InstancePropertiesPatch do - not store customer-supplied encryption keys, so + not storecustomer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. @@ -14285,45 +17044,59 @@ class AttachedDiskInitializeParams(proto.Message): The source instant-snapshot to create this disk. When creating a new instance boot disk, one of initializeParams.sourceSnapshot or - initializeParams.sourceInstantSnapshot - initializeParams.sourceImage or disks.source is - required. To create a disk with a snapshot that - you created, specify the snapshot name in the + initializeParams.sourceInstantSnapshotinitializeParams.sourceImage + or disks.source is required. + + To create a disk with a snapshot that you + created, specify the snapshot name in the following format: - us-central1-a/instantSnapshots/my-backup If the - source instant-snapshot is deleted later, this - field will not be set. + + us-central1-a/instantSnapshots/my-backup + + If the source instant-snapshot is deleted later, + this field will not be set. This field is a member of `oneof`_ ``_source_instant_snapshot``. source_snapshot (str): The source snapshot to create this disk. When creating a new instance boot disk, one of - initializeParams.sourceSnapshot or - initializeParams.sourceImage or disks.source is - required. To create a disk with a snapshot that - you created, specify the snapshot name in the - following format: global/snapshots/my-backup If - the source snapshot is deleted later, this field - will not be set. Note: You cannot create VMs in - bulk using a snapshot as the source. Use an - image instead when you create VMs using the bulk + initializeParams.sourceSnapshot + orinitializeParams.sourceImage or disks.source + is required. + + To create a disk with a snapshot that you + created, specify the snapshot name in the + following format: + + global/snapshots/my-backup + + If the source snapshot is deleted later, this + field will not be set. + + Note: You cannot create VMs in bulk using a + snapshot as the source. Use an image instead + when you create VMs using + the bulk insert method. This field is a member of `oneof`_ ``_source_snapshot``. source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source snapshot. + Thecustomer-supplied + encryption key of the source snapshot. This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. storage_pool (str): The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /storagePools/storagePool - - projects/project/zones/zone/storagePools/storagePool - - zones/zone/storagePools/storagePool + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool + - + projects/project/zones/zone/storagePools/storagePool + - zones/zone/storagePools/storagePool This field is a member of `oneof`_ ``_storage_pool``. """ @@ -14487,21 +17260,57 @@ class AuditConfig(proto.Message): r"""Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or - more AuditLogConfigs. If there are AuditConfigs for both - ``allServices`` and a specific service, the union of the two - AuditConfigs is used for that service: the log_types specified in - each AuditConfig are enabled, and the exempted_members in each - AuditLogConfig are exempted. Example Policy with multiple - AuditConfigs: { "audit_configs": [ { "service": "allServices", - "audit_log_configs": [ { "log_type": "DATA_READ", - "exempted_members": [ "user:jose@example.com" ] }, { "log_type": - "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": - "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": - "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ - "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy - enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also - exempts ``jose@example.com`` from DATA_READ logging, and - ``aliya@example.com`` from DATA_WRITE logging. + more AuditLogConfigs. + + If there are AuditConfigs for both ``allServices`` and a specific + service, the union of the two AuditConfigs is used for that service: + the log_types specified in each AuditConfig are enabled, and the + exempted_members in each AuditLogConfig are exempted. + + Example Policy with multiple AuditConfigs: + + :: + + { + "audit_configs": [ + { + "service": "allServices", + "audit_log_configs": [ + { + "log_type": "DATA_READ", + "exempted_members": [ + "user:jose@example.com" + ] + }, + { + "log_type": "DATA_WRITE" + }, + { + "log_type": "ADMIN_READ" + } + ] + }, + { + "service": "sampleservice.googleapis.com", + "audit_log_configs": [ + { + "log_type": "DATA_READ" + }, + { + "log_type": "DATA_WRITE", + "exempted_members": [ + "user:aliya@example.com" + ] + } + ] + } + ] + } + + For sampleservice, this policy enables DATA_READ, DATA_WRITE and + ADMIN_READ logging. It also exempts ``jose@example.com`` from + DATA_READ logging, and ``aliya@example.com`` from DATA_WRITE + logging. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -14539,10 +17348,26 @@ class AuditConfig(proto.Message): class AuditLogConfig(proto.Message): r"""Provides the configuration for logging a type of permissions. - Example: { "audit_log_configs": [ { "log_type": "DATA_READ", - "exempted_members": [ "user:jose@example.com" ] }, { "log_type": - "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' - logging, while exempting jose@example.com from DATA_READ logging. + Example: + + :: + + { + "audit_log_configs": [ + { + "log_type": "DATA_READ", + "exempted_members": [ + "user:jose@example.com" + ] + }, + { + "log_type": "DATA_WRITE" + } + ] + } + + This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + jose@example.com from DATA_READ logging. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -14550,8 +17375,8 @@ class AuditLogConfig(proto.Message): Attributes: exempted_members (MutableSequence[str]): Specifies the identities that do not cause - logging for this type of permission. Follows the - same format of Binding.members. + logging for this type of permission. + Follows the same format of Binding.members. ignore_child_exemptions (bool): This field is a member of `oneof`_ ``_ignore_child_exemptions``. @@ -14602,15 +17427,21 @@ class LogType(proto.Enum): class Autoscaler(proto.Message): - r"""Represents an Autoscaler resource. Google Compute Engine has two - Autoscaler resources: \* - `Zonal `__ \* - `Regional `__ + r"""Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - `Zonal `__ + - `Regional `__ + Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. - For more information, read Autoscaling Groups of Instances. For - zonal managed instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the regionAutoscalers + For more information, read Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the autoscaler + resource. + + For regional managed instance groups, use theregionAutoscalers resource. @@ -14620,15 +17451,17 @@ class Autoscaler(proto.Message): autoscaling_policy (google.cloud.compute_v1beta.types.AutoscalingPolicy): The configuration parameters for the autoscaling algorithm. You can define one or - more signals for an autoscaler: cpuUtilization, - customMetricUtilizations, and - loadBalancingUtilization. If none of these are - specified, the default will be to autoscale - based on cpuUtilization to 0.6 or 60%. + more signals for an autoscaler: + cpuUtilization,customMetricUtilizations, + andloadBalancingUtilization. + + If none of these are specified, the default will + be to autoscale based oncpuUtilization to 0.6 or + 60%. This field is a member of `oneof`_ ``_autoscaling_policy``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -14650,7 +17483,7 @@ class Autoscaler(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -14668,7 +17501,7 @@ class Autoscaler(proto.Message): This field is a member of `oneof`_ ``_recommended_size``. region (str): - [Output Only] URL of the region where the instance group + [Output Only] URL of theregion where the instance group resides (for autoscalers living in regional scope). This field is a member of `oneof`_ ``_region``. @@ -14681,20 +17514,28 @@ class Autoscaler(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): [Output Only] The status of the autoscaler configuration. - Current set of possible values: - PENDING: Autoscaler - backend hasn't read new/updated configuration. - DELETING: - Configuration is being deleted. - ACTIVE: Configuration is - acknowledged to be effective. Some warnings might be present - in the statusDetails field. - ERROR: Configuration has - errors. Actionable for users. Details are present in the - statusDetails field. New values might be added in the - future. Check the Status enum for the list of possible - values. + Current set of possible values: + + :: + + - PENDING: + Autoscaler backend hasn't read new/updated configuration. + - DELETING: + Configuration is being deleted. + - ACTIVE: + Configuration is acknowledged to be effective. Some warnings might + be present in the statusDetails field. + - ERROR: + Configuration has errors. Actionable for users. Details are present in + the statusDetails field. + + New values might be added in the future. Check the Status + enum for the list of possible values. This field is a member of `oneof`_ ``_status``. status_details (MutableSequence[google.cloud.compute_v1beta.types.AutoscalerStatusDetails]): [Output Only] Human-readable details about the current state - of the autoscaler. Read the documentation for Commonly + of the autoscaler. Read the documentation forCommonly returned status messages for examples of status messages you might encounter. target (str): @@ -14704,7 +17545,7 @@ class Autoscaler(proto.Message): This field is a member of `oneof`_ ``_target``. zone (str): - [Output Only] URL of the zone where the instance group + [Output Only] URL of thezone where the instance group resides (for autoscalers living in zonal scope). This field is a member of `oneof`_ ``_zone``. @@ -14712,12 +17553,22 @@ class Autoscaler(proto.Message): class Status(proto.Enum): r"""[Output Only] The status of the autoscaler configuration. Current - set of possible values: - PENDING: Autoscaler backend hasn't read - new/updated configuration. - DELETING: Configuration is being - deleted. - ACTIVE: Configuration is acknowledged to be effective. - Some warnings might be present in the statusDetails field. - ERROR: - Configuration has errors. Actionable for users. Details are present - in the statusDetails field. New values might be added in the future. + set of possible values: + + :: + + - PENDING: + Autoscaler backend hasn't read new/updated configuration. + - DELETING: + Configuration is being deleted. + - ACTIVE: + Configuration is acknowledged to be effective. Some warnings might + be present in the statusDetails field. + - ERROR: + Configuration has errors. Actionable for users. Details are present in + the statusDetails field. + + New values might be added in the future. Values: UNDEFINED_STATUS (0): @@ -14830,15 +17681,15 @@ class AutoscalerAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.AutoscalersScopedList]): A list of AutoscalersScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#autoscalerAggregatedList for aggregated lists of - autoscalers. + [Output Only] Type of resource. + Alwayscompute#autoscalerAggregatedList for aggregated lists + of autoscalers. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -14920,7 +17771,7 @@ class AutoscalerList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -14985,45 +17836,58 @@ class AutoscalerStatusDetails(proto.Message): This field is a member of `oneof`_ ``_message``. type_ (str): The type of error, warning, or notice returned. Current set - of possible values: - ALL_INSTANCES_UNHEALTHY (WARNING): All - instances in the instance group are unhealthy (not in - RUNNING state). - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): - There is no backend service attached to the instance group. - - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler - recommends a size greater than maxNumReplicas. - - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom - metric samples are not exported often enough to be a - credible base for autoscaling. - CUSTOM_METRIC_INVALID - (ERROR): The custom metric that was specified does not exist - or does not have the necessary labels. - MIN_EQUALS_MAX - (WARNING): The minNumReplicas is equal to maxNumReplicas. - This means the autoscaler cannot add or remove instances - from the instance group. - MISSING_CUSTOM_METRIC_DATA_POINTS - (WARNING): The autoscaler did not receive any data from the - custom metric configured for autoscaling. - - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler - is configured to scale based on a load balancing signal but - the instance group has not received any requests from the - load balancer. - MODE_OFF (WARNING): Autoscaling is turned - off. The number of instances in the group won't change - automatically. The autoscaling configuration is preserved. - - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale - only out" mode. The autoscaler can add instances but not - remove any. - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The - instance group cannot be autoscaled because it has more than - one backend service attached to it. - - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient - quota for the necessary resources, such as CPU or number of - instances. - REGION_RESOURCE_STOCKOUT (ERROR): Shown only - for regional autoscalers: there is a resource stockout in - the chosen region. - SCALING_TARGET_DOES_NOT_EXIST (ERROR): - The target to be scaled does not exist. - - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): - Autoscaling does not work with an HTTP/S load balancer that - has been configured for maxRate. - ZONE_RESOURCE_STOCKOUT - (ERROR): For zonal autoscalers: there is a resource stockout - in the chosen zone. For regional autoscalers: in at least - one of the zones you're using there is a resource stockout. + of possible values: + + :: + + - ALL_INSTANCES_UNHEALTHY (WARNING): + All instances in the instance group are unhealthy (not in RUNNING + state). + - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): + There is no backend service attached to the instance group. + - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): + Autoscaler recommends a size greater than maxNumReplicas. + - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): + The custom metric samples are not exported often enough to be + a credible base for autoscaling. + - CUSTOM_METRIC_INVALID (ERROR): + The custom metric that was specified does not exist or does not have + the necessary labels. + - MIN_EQUALS_MAX (WARNING): + The minNumReplicas is equal to maxNumReplicas. This means the + autoscaler cannot add or remove instances from the instance group. + - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): + The autoscaler did not receive any data from the custom metric + configured for autoscaling. + - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): + The autoscaler is configured to scale based on a load balancing signal + but the instance group has not received any requests from the load + balancer. + - MODE_OFF (WARNING): + Autoscaling is turned off. The number of instances in the group won't + change automatically. The autoscaling configuration is preserved. + - MODE_ONLY_UP (WARNING): + Autoscaling is in the "Autoscale only out" mode. The autoscaler can add + instances but not remove any. + - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): + The instance group cannot be autoscaled because it has more than one + backend service attached to it. + - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): + There is insufficient quota for the necessary resources, such as CPU or + number of instances. + - REGION_RESOURCE_STOCKOUT (ERROR): + Shown only for regional autoscalers: there is a resource stockout in + the chosen region. + - SCALING_TARGET_DOES_NOT_EXIST (ERROR): + The target to be scaled does not exist. + - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION + (ERROR): Autoscaling does not work with an HTTP/S load balancer that + has been configured for maxRate. + - ZONE_RESOURCE_STOCKOUT (ERROR): + For zonal autoscalers: there is a resource stockout in the chosen zone. + For regional autoscalers: in at least one of the zones you're using + there is a resource stockout. + New values might be added in the future. Some of the values might not be available in all API versions. Check the Type enum for the list of possible values. @@ -15033,43 +17897,60 @@ class AutoscalerStatusDetails(proto.Message): class Type(proto.Enum): r"""The type of error, warning, or notice returned. Current set of - possible values: - ALL_INSTANCES_UNHEALTHY (WARNING): All instances - in the instance group are unhealthy (not in RUNNING state). - - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service - attached to the instance group. - CAPPED_AT_MAX_NUM_REPLICAS - (WARNING): Autoscaler recommends a size greater than maxNumReplicas. - - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric - samples are not exported often enough to be a credible base for - autoscaling. - CUSTOM_METRIC_INVALID (ERROR): The custom metric that - was specified does not exist or does not have the necessary labels. - - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to - maxNumReplicas. This means the autoscaler cannot add or remove - instances from the instance group. - - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not - receive any data from the custom metric configured for autoscaling. - - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is - configured to scale based on a load balancing signal but the - instance group has not received any requests from the load balancer. - - MODE_OFF (WARNING): Autoscaling is turned off. The number of - instances in the group won't change automatically. The autoscaling - configuration is preserved. - MODE_ONLY_UP (WARNING): Autoscaling is - in the "Autoscale only out" mode. The autoscaler can add instances - but not remove any. - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The - instance group cannot be autoscaled because it has more than one - backend service attached to it. - NOT_ENOUGH_QUOTA_AVAILABLE - (ERROR): There is insufficient quota for the necessary resources, - such as CPU or number of instances. - REGION_RESOURCE_STOCKOUT - (ERROR): Shown only for regional autoscalers: there is a resource - stockout in the chosen region. - SCALING_TARGET_DOES_NOT_EXIST - (ERROR): The target to be scaled does not exist. - - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): - Autoscaling does not work with an HTTP/S load balancer that has been - configured for maxRate. - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal - autoscalers: there is a resource stockout in the chosen zone. For - regional autoscalers: in at least one of the zones you're using - there is a resource stockout. New values might be added in the - future. Some of the values might not be available in all API - versions. + possible values: + + :: + + - ALL_INSTANCES_UNHEALTHY (WARNING): + All instances in the instance group are unhealthy (not in RUNNING + state). + - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): + There is no backend service attached to the instance group. + - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): + Autoscaler recommends a size greater than maxNumReplicas. + - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): + The custom metric samples are not exported often enough to be + a credible base for autoscaling. + - CUSTOM_METRIC_INVALID (ERROR): + The custom metric that was specified does not exist or does not have + the necessary labels. + - MIN_EQUALS_MAX (WARNING): + The minNumReplicas is equal to maxNumReplicas. This means the + autoscaler cannot add or remove instances from the instance group. + - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): + The autoscaler did not receive any data from the custom metric + configured for autoscaling. + - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): + The autoscaler is configured to scale based on a load balancing signal + but the instance group has not received any requests from the load + balancer. + - MODE_OFF (WARNING): + Autoscaling is turned off. The number of instances in the group won't + change automatically. The autoscaling configuration is preserved. + - MODE_ONLY_UP (WARNING): + Autoscaling is in the "Autoscale only out" mode. The autoscaler can add + instances but not remove any. + - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): + The instance group cannot be autoscaled because it has more than one + backend service attached to it. + - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): + There is insufficient quota for the necessary resources, such as CPU or + number of instances. + - REGION_RESOURCE_STOCKOUT (ERROR): + Shown only for regional autoscalers: there is a resource stockout in + the chosen region. + - SCALING_TARGET_DOES_NOT_EXIST (ERROR): + The target to be scaled does not exist. + - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION + (ERROR): Autoscaling does not work with an HTTP/S load balancer that + has been configured for maxRate. + - ZONE_RESOURCE_STOCKOUT (ERROR): + For zonal autoscalers: there is a resource stockout in the chosen zone. + For regional autoscalers: in at least one of the zones you're using + there is a resource stockout. + + New values might be added in the future. Some of the values might + not be available in all API versions. Values: UNDEFINED_TYPE (0): @@ -15226,8 +18107,10 @@ class AutoscalingPolicy(proto.Message): autoscaler ignores data from VMs that are still initializing because those VMs might not yet represent normal usage of your application. The default initialization period is 60 - seconds. Initialization periods might vary because of - numerous factors. We recommend that you test how long your + seconds. + + Initialization periods might vary because of numerous + factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process. @@ -15265,12 +18148,20 @@ class AutoscalingPolicy(proto.Message): This field is a member of `oneof`_ ``_min_num_replicas``. mode (str): Defines the operating mode for this policy. The following - modes are available: - OFF: Disables the autoscaler but - maintains its configuration. - ONLY_SCALE_OUT: Restricts the - autoscaler to add VM instances only. - ON: Enables all - autoscaler activities according to its policy. For more - information, see "Turning off or restricting an autoscaler" - Check the Mode enum for the list of possible values. + modes are available: + + :: + + - OFF: Disables the autoscaler but maintains its + configuration. + - ONLY_SCALE_OUT: Restricts the autoscaler to add + VM instances only. + - ON: Enables all autoscaler activities according to its + policy. + + For more information, see "Turning off or restricting an + autoscaler" Check the Mode enum for the list of possible + values. This field is a member of `oneof`_ ``_mode``. scale_down_control (google.cloud.compute_v1beta.types.AutoscalingPolicyScaleDownControl): @@ -15289,11 +18180,18 @@ class AutoscalingPolicy(proto.Message): class Mode(proto.Enum): r"""Defines the operating mode for this policy. The following modes are - available: - OFF: Disables the autoscaler but maintains its - configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM - instances only. - ON: Enables all autoscaler activities according to - its policy. For more information, see "Turning off or restricting an - autoscaler" + available: + + :: + + - OFF: Disables the autoscaler but maintains its + configuration. + - ONLY_SCALE_OUT: Restricts the autoscaler to add + VM instances only. + - ON: Enables all autoscaler activities according to its + policy. + + For more information, see "Turning off or restricting an autoscaler" Values: UNDEFINED_MODE (0): @@ -15390,38 +18288,46 @@ class AutoscalingPolicyCpuUtilization(proto.Message): Attributes: predictive_method (str): Indicates whether predictive autoscaling based on CPU metric - is enabled. Valid values are: \* NONE (default). No - predictive method is used. The autoscaler scales the group - to meet current demand based on real-time metrics. \* - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves - availability by monitoring daily and weekly load patterns - and scaling out ahead of anticipated demand. Check the - PredictiveMethod enum for the list of possible values. + is enabled. Valid values are: + + - NONE (default). No predictive method is used. The + autoscaler scales the group to meet current demand based + on real-time metrics. + - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves + availability by monitoring daily and weekly load patterns + and scaling out ahead of anticipated demand. Check the + PredictiveMethod enum for the list of possible values. This field is a member of `oneof`_ ``_predictive_method``. utilization_target (float): The target CPU utilization that the autoscaler maintains. Must be a float value in the range (0, 1]. If not specified, - the default is 0.6. If the CPU level is below the target - utilization, the autoscaler scales in the number of - instances until it reaches the minimum number of instances - you specified or until the average CPU of your instances - reaches the target utilization. If the average CPU is above - the target utilization, the autoscaler scales out until it - reaches the maximum number of instances you specified or - until the average utilization reaches the target + the default is0.6. + + If the CPU level is below the target utilization, the + autoscaler scales in the number of instances until it + reaches the minimum number of instances you specified or + until the average CPU of your instances reaches the target utilization. + If the average CPU is above the target utilization, the + autoscaler scales out until it reaches the maximum number of + instances you specified or until the average utilization + reaches the target utilization. + This field is a member of `oneof`_ ``_utilization_target``. """ class PredictiveMethod(proto.Enum): r"""Indicates whether predictive autoscaling based on CPU metric is - enabled. Valid values are: \* NONE (default). No predictive method - is used. The autoscaler scales the group to meet current demand - based on real-time metrics. \* OPTIMIZE_AVAILABILITY. Predictive - autoscaling improves availability by monitoring daily and weekly - load patterns and scaling out ahead of anticipated demand. + enabled. Valid values are: + + - NONE (default). No predictive method is used. The autoscaler + scales the group to meet current demand based on real-time + metrics. + - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves + availability by monitoring daily and weekly load patterns and + scaling out ahead of anticipated demand. Values: UNDEFINED_PREDICTIVE_METHOD (0): @@ -15462,41 +18368,55 @@ class AutoscalingPolicyCustomMetricUtilization(proto.Message): Attributes: filter (str): - A filter string, compatible with a Stackdriver Monitoring - filter string for TimeSeries.list API call. This filter is - used to select a specific TimeSeries for the purpose of - autoscaling and to determine whether the metric is exporting - per-instance or per-group data. For the filter to be valid - for autoscaling purposes, the following rules apply: - You - can only use the AND operator for joining selectors. - You - can only use direct equality comparison operator (=) without - any functions for each selector. - You can specify the - metric in both the filter string and in the metric field. - However, if specified in both places, the metric must be - identical. - The monitored resource type determines what - kind of values are expected for the metric. If it is a - gce_instance, the autoscaler expects the metric to include a - separate TimeSeries for each instance in a group. In such a - case, you cannot filter on resource labels. If the resource - type is any other value, the autoscaler expects this metric - to contain values that apply to the entire autoscaled - instance group and resource label filtering can be performed - to point autoscaler at the correct TimeSeries to scale upon. - This is called a *per-group metric* for the purpose of - autoscaling. If not specified, the type defaults to - gce_instance. Try to provide a filter that is selective - enough to pick just one TimeSeries for the autoscaled group - or for each of the instances (if you are using gce_instance - resource type). If multiple TimeSeries are returned upon the - query execution, the autoscaler will sum their respective - values to obtain its scaling value. + A filter string, compatible with a Stackdriver + Monitoringfilter string forTimeSeries.list API call. This + filter is used to select a specific TimeSeries for the + purpose of autoscaling and to determine whether the metric + is exporting per-instance or per-group data. + + For the filter to be valid for autoscaling purposes, the + following rules apply: + + :: + + - You can only use the AND operator for joining + selectors. + - You can only use direct equality comparison operator + (=) without any functions for each selector. + - You can specify the metric in both the filter string and in the + metric field. However, if specified in both places, the metric must + be identical. + - The monitored resource type + determines what kind of values are expected for the metric. If it is + a gce_instance, the autoscaler expects the metric to + include a separate TimeSeries for each instance in a group. In such a + case, you cannot filter on resource labels. + + + If the resource type is any other value, the autoscaler expects + this metric to contain values that apply to the entire autoscaled + instance group and resource label filtering can be performed to + point autoscaler at the correct TimeSeries to scale upon. This is + called a *per-group metric* for the purpose of autoscaling. + + If not specified, the type defaults to + gce_instance. + + Try to provide a filter that is selective enough to pick + just one TimeSeries for the autoscaled group or for each of + the instances (if you are using gce_instance resource type). + If multiple TimeSeries are returned upon the query + execution, the autoscaler will sum their respective values + to obtain its scaling value. This field is a member of `oneof`_ ``_filter``. metric (str): The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have - negative values. The metric must have a value - type of INT64 or DOUBLE. + negative values. + + The metric must have a value type of INT64 + orDOUBLE. This field is a member of `oneof`_ ``_metric``. single_instance_assignment (float): @@ -15505,31 +18425,35 @@ class AutoscalingPolicyCustomMetricUtilization(proto.Message): usage, set this value to an amount assigned for a single instance of the scaled group. Autoscaler keeps the number of instances proportional to the value of this metric. The - metric itself does not change value due to group resizing. A - good metric to use with the target is for example - pubsub.googleapis.com/subscription/num_undelivered_messages + metric itself does not change value due to group resizing. + + A good metric to use with the target is for + examplepubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests - coming to your instances. A bad example would be a metric - exporting an average or median latency, since this value - can't include a chunk assignable to a single instance, it - could be better used with utilization_target instead. + coming to your instances. + + A bad example would be a metric exporting an average or + median latency, since this value can't include a chunk + assignable to a single instance, it could be better used + with utilization_target instead. This field is a member of `oneof`_ ``_single_instance_assignment``. utilization_target (float): The target value of the metric that autoscaler maintains. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or - decrease proportionally to the metric. For example, a good - metric to use as a utilization_target is - https://www.googleapis.com/compute/v1/instance/network/received_bytes_count. + decrease proportionally to the metric. + + For example, a good metric to use as a utilization_target + ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count. The autoscaler works to keep this value constant for each of the instances. This field is a member of `oneof`_ ``_utilization_target``. utilization_target_type (str): Defines how target utilization value is expressed for a - Stackdriver Monitoring metric. Either GAUGE, - DELTA_PER_SECOND, or DELTA_PER_MINUTE. Check the + Stackdriver Monitoring metric. Either + GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE. Check the UtilizationTargetType enum for the list of possible values. This field is a member of `oneof`_ ``_utilization_target_type``. @@ -15537,7 +18461,7 @@ class AutoscalingPolicyCustomMetricUtilization(proto.Message): class UtilizationTargetType(proto.Enum): r"""Defines how target utilization value is expressed for a Stackdriver - Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or + Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE. Values: @@ -15794,10 +18718,12 @@ class Backend(proto.Message): backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. + Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. + Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact @@ -15813,15 +18739,16 @@ class Backend(proto.Message): A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity - (depending on balancingMode). A setting of 0 means the group + (depending onbalancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot - configure a setting larger than 0 and smaller than 0.1. You + configure a setting larger than 0 and smaller than0.1. You cannot configure a setting of 0 when there is only one - backend attached to the backend service. Not available with - backends that don't support using a balancingMode. This - includes backends such as global internet NEGs, regional - serverless NEGs, and PSC NEGs. + backend attached to the backend service. + + Not available with backends that don't support using + abalancingMode. This includes backends such as global + internet NEGs, regional serverless NEGs, and PSC NEGs. This field is a member of `oneof`_ ``_capacity_scaler``. custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendCustomMetric]): @@ -15840,45 +18767,51 @@ class Backend(proto.Message): This field is a member of `oneof`_ ``_failover``. group (str): - The fully-qualified URL of an instance group or network + The fully-qualified URL of aninstance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the `Backend services overview `__. - You must use the *fully-qualified* URL (starting with - https://www.googleapis.com/) to specify the instance group - or NEG. Partial URLs are not supported. If haPolicy is - specified, backends must refer to NEG resources of type - GCE_VM_IP. + + You must use the *fully-qualified* URL (starting + withhttps://www.googleapis.com/) to specify the instance + group or NEG. Partial URLs are not supported. + + If haPolicy is specified, backends must refer to NEG + resources of type GCE_VM_IP. This field is a member of `oneof`_ ``_group``. max_connections (int): Defines a target maximum number of simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. + seeConnection balancing mode and Utilization + balancing mode. Not available if the + backend'sbalancingMode is RATE. This field is a member of `oneof`_ ``_max_connections``. max_connections_per_endpoint (int): Defines a target maximum number of - simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. + simultaneous connections. For usage guidelines, + seeConnection balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isRATE. This field is a member of `oneof`_ ``_max_connections_per_endpoint``. max_connections_per_instance (int): Defines a target maximum number of simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. + seeConnection balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isRATE. This field is a member of `oneof`_ ``_max_connections_per_instance``. max_in_flight_requests (int): Defines a maximum number of in-flight requests for the whole NEG or instance group. - Not available if backend's balancingMode is RATE + Not available if backend's balancingMode isRATE or CONNECTION. This field is a member of `oneof`_ ``_max_in_flight_requests``. @@ -15896,45 +18829,55 @@ class Backend(proto.Message): This field is a member of `oneof`_ ``_max_in_flight_requests_per_instance``. max_rate (int): Defines a maximum number of HTTP requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. This field is a member of `oneof`_ ``_max_rate``. max_rate_per_endpoint (float): Defines a maximum target for requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. This field is a member of `oneof`_ ``_max_rate_per_endpoint``. max_rate_per_instance (float): Defines a maximum target for requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. This field is a member of `oneof`_ ``_max_rate_per_instance``. max_utilization (float): - Optional parameter to define a target capacity for the - UTILIZATION balancing mode. The valid range is [0.0, 1.0]. - For usage guidelines, see Utilization balancing mode. + Optional parameter to define a target capacity for + theUTILIZATION balancing mode. The valid range is[0.0, 1.0]. + + For usage guidelines, seeUtilization balancing mode. This field is a member of `oneof`_ ``_max_utilization``. preference (str): This field indicates whether this backend should be fully utilized before sending traffic to backends with default preference. The - possible values are: - PREFERRED: Backends with - this preference level will be filled up to their - capacity limits first, based on RTT. - DEFAULT: - If preferred backends don't have enough - capacity, backends in this layer would be used - and traffic would be assigned based on the load - balancing algorithm you use. This is the default + possible values are: + + - PREFERRED: Backends with this preference + level will be filled up to their capacity + limits first, based on RTT. + - DEFAULT: If preferred backends don't have + enough capacity, backends in this layer + would be used and traffic would be assigned + based on the load balancing algorithm you use. + This is the default Check the Preference enum for the list of possible values. @@ -15949,15 +18892,18 @@ class Backend(proto.Message): class BalancingMode(proto.Enum): r"""Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For - usage guidelines, see Connection balancing mode. Backends must - use compatible balancing modes. For more information, see - Supported balancing modes and target capacity settings and - Restrictions and guidance for instance groups. Note: Currently, - if you use the API to configure incompatible balancing modes, - the configuration might be accepted even though it has no impact - and is ignored. Specifically, Backend.maxUtilization is ignored - when Backend.balancingMode is RATE. In the future, this - incompatible combination will be rejected. + usage guidelines, see Connection balancing mode. + + Backends must use compatible balancing modes. For more + information, see Supported balancing modes and target capacity + settings and Restrictions and guidance for instance groups. + + Note: Currently, if you use the API to configure incompatible + balancing modes, the configuration might be accepted even though + it has no impact and is ignored. Specifically, + Backend.maxUtilization is ignored when Backend.balancingMode is + RATE. In the future, this incompatible combination will be + rejected. Values: UNDEFINED_BALANCING_MODE (0): @@ -15986,12 +18932,14 @@ class BalancingMode(proto.Enum): class Preference(proto.Enum): r"""This field indicates whether this backend should be fully utilized before sending traffic to backends with default - preference. The possible values are: - PREFERRED: Backends with - this preference level will be filled up to their capacity limits - first, based on RTT. - DEFAULT: If preferred backends don't have - enough capacity, backends in this layer would be used and - traffic would be assigned based on the load balancing algorithm - you use. This is the default + preference. The possible values are: + + - PREFERRED: Backends with this preference level will be + filled up to their capacity limits first, based on RTT. + - DEFAULT: If preferred backends don't have enough + capacity, backends in this layer would be used and traffic + would be assigned based on the load balancing algorithm you + use. This is the default Values: UNDEFINED_PREFERENCE (0): @@ -16124,9 +19072,10 @@ class TrafficDuration(proto.Enum): class BackendBucket(proto.Message): - r"""Represents a Cloud Storage Bucket resource. This Cloud - Storage bucket resource is referenced by a URL map of a load - balancer. For more information, read Backend Buckets. + r"""Represents a Cloud Storage Bucket resource. + + This Cloud Storage bucket resource is referenced by a URL map of + a load balancer. For more information, readBackend Buckets. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -16150,7 +19099,7 @@ class BackendBucket(proto.Message): This field is a member of `oneof`_ ``_compression_mode``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. custom_response_headers (MutableSequence[str]): @@ -16183,17 +19132,19 @@ class BackendBucket(proto.Message): This field is a member of `oneof`_ ``_kind``. load_balancing_scheme (str): The value can only be INTERNAL_MANAGED for cross-region - internal layer 7 load balancer. If loadBalancingScheme is - not specified, the backend bucket can be used by classic - global external load balancers, or global application - external load balancers, or both. Check the - LoadBalancingScheme enum for the list of possible values. + internal layer 7 load balancer. + + If loadBalancingScheme is not specified, the backend bucket + can be used by classic global external load balancers, or + global application external load balancers, or both. Check + the LoadBalancingScheme enum for the list of possible + values. This field is a member of `oneof`_ ``_load_balancing_scheme``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -16206,6 +19157,14 @@ class BackendBucket(proto.Message): request, but not persisted as part of resource payload. This field is a member of `oneof`_ ``_params``. + region (str): + [Output Only] URL of the region where the regional backend + bucket resides. This field is not applicable to global + backend buckets. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. + + This field is a member of `oneof`_ ``_region``. self_link (str): [Output Only] Server-defined URL for the resource. @@ -16238,19 +19197,25 @@ class CompressionMode(proto.Enum): class LoadBalancingScheme(proto.Enum): r"""The value can only be INTERNAL_MANAGED for cross-region internal - layer 7 load balancer. If loadBalancingScheme is not specified, the - backend bucket can be used by classic global external load - balancers, or global application external load balancers, or both. + layer 7 load balancer. + + If loadBalancingScheme is not specified, the backend bucket can be + used by classic global external load balancers, or global + application external load balancers, or both. Values: UNDEFINED_LOAD_BALANCING_SCHEME (0): A value indicating that the enum field is not set. + EXTERNAL_MANAGED (512006923): + Signifies that this will be used for regional + external Application Load Balancers. INTERNAL_MANAGED (37350397): Signifies that this will be used for internal Application Load Balancers. """ UNDEFINED_LOAD_BALANCING_SCHEME = 0 + EXTERNAL_MANAGED = 512006923 INTERNAL_MANAGED = 37350397 bucket_name: str = proto.Field( @@ -16319,6 +19284,11 @@ class LoadBalancingScheme(proto.Enum): optional=True, message="BackendBucketParams", ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) self_link: str = proto.Field( proto.STRING, number=456214797, @@ -16331,6 +19301,80 @@ class LoadBalancingScheme(proto.Enum): ) +class BackendBucketAggregatedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.BackendBucketsScopedList]): + A list of BackendBucketsScopedList resources. + kind (str): + Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "BackendBucketsScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="BackendBucketsScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + class BackendBucketCdnPolicy(proto.Message): r"""Message containing Cloud CDN configuration for a backend bucket. @@ -16351,23 +19395,25 @@ class BackendBucketCdnPolicy(proto.Message): This field is a member of `oneof`_ ``_cache_key_policy``. cache_mode (str): Specifies the cache setting for all responses from this - backend. The possible values are: USE_ORIGIN_HEADERS - Requires the origin to set valid caching headers to cache - content. Responses without these headers will not be cached - at Google's edge, and will require a full trip to the origin - on every request, potentially impacting performance and - increasing load on the origin server. FORCE_CACHE_ALL Cache + backend. The possible values are:USE_ORIGIN_HEADERS Requires + the origin to set valid caching headers to cache content. + Responses without these headers will not be cached at + Google's edge, and will require a full trip to the origin on + every request, potentially impacting performance and + increasing load on the origin server.FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC + per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), - will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. Check - the CacheMode enum for the list of possible values. + will not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults + to CACHE_ALL_STATIC. Check the CacheMode enum for the list + of possible values. This field is a member of `oneof`_ ``_cache_mode``. client_ttl (int): @@ -16400,17 +19446,19 @@ class BackendBucketCdnPolicy(proto.Message): This field is a member of `oneof`_ ``_default_ttl``. max_ttl (int): Specifies the maximum allowed TTL for cached - content served by this origin. Cache directives - that attempt to set a max-age or s-maxage higher - than this, or an Expires header more than maxTTL - seconds in the future will be capped at the - value of maxTTL, as if it were the value of an - s-maxage Cache-Control directive. Headers sent - to the client will not be modified. Setting a - TTL of "0" means "always revalidate". The - maximum allowed value is 31,622,400s (1 year), - noting that infrequently accessed objects may be - evicted from the cache before the defined TTL. + content served by this origin. + Cache directives that attempt to set a max-age + or s-maxage higher than this, or an Expires + header more than maxTTL seconds in the future + will be capped at the value of maxTTL, as if it + were the value of an s-maxage Cache-Control + directive. + Headers sent to the client will not be modified. + Setting a TTL of "0" means "always revalidate". + The maximum allowed value is 31,622,400s (1 + year), noting that infrequently accessed objects + may be evicted from the cache before the defined + TTL. This field is a member of `oneof`_ ``_max_ttl``. negative_caching (bool): @@ -16453,16 +19501,17 @@ class BackendBucketCdnPolicy(proto.Message): Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when - refreshing the cache. This setting defines the - default "max-stale" duration for any cached - responses that do not specify a max-stale - directive. Stale responses that exceed the TTL - configured here will not be served. The default - limit (max-stale) is 86400s (1 day), which will - allow stale content to be served up to this - limit beyond the max-age (or s-maxage) of a - cached response. The maximum allowed value is - 604800 (1 week). Set this to zero (0) to disable + refreshing the cache. + This setting defines the default "max-stale" + duration for any cached responses that do not + specify a max-stale directive. Stale responses + that exceed the TTL configured here will not be + served. The default limit (max-stale) is 86400s + (1 day), which will allow stale content to be + served up to this limit beyond the max-age (or + s-maxage) of a cached response. + The maximum allowed value is 604800 (1 week). + Set this to zero (0) to disable serve-while-stale. This field is a member of `oneof`_ ``_serve_while_stale``. @@ -16484,20 +19533,22 @@ class BackendBucketCdnPolicy(proto.Message): class CacheMode(proto.Enum): r"""Specifies the cache setting for all responses from this backend. The - possible values are: USE_ORIGIN_HEADERS Requires the origin to set + possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting - performance and increasing load on the origin server. - FORCE_CACHE_ALL Cache all content, ignoring any "private", - "no-store" or "no-cache" directives in Cache-Control response - headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC Automatically - cache static content, including common image formats, media (video - and audio), and web assets (JavaScript and CSS). Requests and - responses that are marked as uncacheable, as well as dynamic content - (including HTML), will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. + performance and increasing load on the origin server.FORCE_CACHE_ALL + Cache all content, ignoring any "private", "no-store" or "no-cache" + directives in Cache-Control response headers. Warning: this may + result in Cloud CDN caching private, per-user (user identifiable) + content.CACHE_ALL_STATIC Automatically cache static content, + including common image formats, media (video and audio), and web + assets (JavaScript and CSS). Requests and responses that are marked + as uncacheable, as well as dynamic content (including HTML), will + not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults to + CACHE_ALL_STATIC. Values: UNDEFINED_CACHE_MODE (0): @@ -16656,9 +19707,9 @@ class BackendBucketCdnPolicyNegativeCachingPolicy(proto.Message): code (int): The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, - 404, 405, 410, 421, 451 and 501 are can be - specified as values, and you cannot specify a - status code more than once. + 404, 405, 410, 421, 451 and 501 can be specified + as values, and you cannot specify a status code + more than once. This field is a member of `oneof`_ ``_code``. ttl (int): @@ -16703,7 +19754,7 @@ class BackendBucketList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -16770,15 +19821,15 @@ class BackendBucketListUsable(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): A list of BackendBucket resources. kind (str): - [Output Only] Type of resource. Always - compute#usableBackendBucketList for lists of usable backend - buckets. + [Output Only] Type of resource. + Alwayscompute#usableBackendBucketList for lists of usable + backend buckets. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -16841,11 +19892,15 @@ class BackendBucketParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -16875,6 +19930,35 @@ class BackendBucketUsedBy(proto.Message): ) +class BackendBucketsScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_buckets (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): + A list of BackendBuckets contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + backend_buckets: MutableSequence["BackendBucket"] = proto.RepeatedField( + proto.MESSAGE, + number=158780702, + message="BackendBucket", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + class BackendCustomMetric(proto.Message): r"""Custom Metrics are used for CUSTOM_METRICS balancing_mode. @@ -16896,15 +19980,15 @@ class BackendCustomMetric(proto.Message): name (str): Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression - `a-z <[-_.a-z0-9]*[a-z0-9]>`__? which means that the first + ``[a-z]([-_.a-z0-9]*[a-z0-9])?`` which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the - loadBalancingScheme set to EXTERNAL_MANAGED, - INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED + INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_name``. """ @@ -16927,19 +20011,23 @@ class BackendCustomMetric(proto.Message): class BackendService(proto.Message): - r"""Represents a Backend Service resource. A backend service defines how - Google Cloud load balancers distribute traffic. The backend service - configuration contains a set of values, such as the protocol used to - connect to backends, various distribution and session settings, - health checks, and timeouts. These settings provide fine-grained - control over how your load balancer behaves. Most of the settings - have default values that allow for easy configuration if you need to - get started quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. + r"""Represents a Backend Service resource. + + A backend service defines how Google Cloud load balancers distribute + traffic. The backend service configuration contains a set of values, + such as the protocol used to connect to backends, various + distribution and session settings, health checks, and timeouts. + These settings provide fine-grained control over how your load + balancer behaves. Most of the settings have default values that + allow for easy configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be either regionally + or globally scoped. + + - `Global `__ + - `Regional `__ + + For more information, seeBackend Services. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -16949,11 +20037,13 @@ class BackendService(proto.Message): Lifetime of cookies in seconds. This setting is applicable to Application Load Balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. + If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The - maximum allowed value is two weeks (1,209,600). Not - supported when the backend service is referenced by a URL - map that is bound to target gRPC proxy that has + maximum allowed value is two weeks (1,209,600). + + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. This field is a member of `oneof`_ ``_affinity_cookie_ttl_sec``. @@ -16988,6 +20078,7 @@ class BackendService(proto.Message): settings are only available for external passthrough Network Load Balancers and internal passthrough Network Load Balancers. + connectionTrackingPolicy cannot be specified with haPolicy. @@ -17000,21 +20091,27 @@ class BackendService(proto.Message): destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This - field is only applicable when localityLbPolicy is set to - MAGLEV or RING_HASH. This field is applicable to either: - A - regional backend service with the service_protocol set to - HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - INTERNAL_MANAGED. - A global backend service with the - load_balancing_scheme set to INTERNAL_SELF_MANAGED. + field is only applicable whenlocalityLbPolicy is set to + MAGLEV orRING_HASH. + + This field is applicable to either: + + :: + + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_consistent_hash``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCustomMetric]): - List of custom metrics that are used for the - WEIGHTED_ROUND_ROBIN locality_lb_policy. + List of custom metrics that are used for + theWEIGHTED_ROUND_ROBIN locality_lb_policy. custom_request_headers (MutableSequence[str]): Headers that the load balancer adds to proxied requests. See `Creating custom @@ -17050,13 +20147,15 @@ class BackendService(proto.Message): This field is a member of `oneof`_ ``_enable_c_d_n``. external_managed_migration_state (str): Specifies the canary migration state. Possible values are - PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin - the migration from EXTERNAL to EXTERNAL_MANAGED, the state - must be changed to PREPARE. The state must be changed to - TEST_ALL_TRAFFIC before the loadBalancingScheme can be - changed to EXTERNAL_MANAGED. Optionally, the + PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, + the state must be changed to PREPARE. The state must be + changed to TEST_ALL_TRAFFIC before the loadBalancingScheme + can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic by percentage using externalManagedMigrationTestingPercentage. + Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC @@ -17069,13 +20168,17 @@ class BackendService(proto.Message): This field is a member of `oneof`_ ``_external_managed_migration_state``. external_managed_migration_testing_percentage (float): Determines the fraction of requests that should be processed - by the Global external Application Load Balancer. The value - of this field must be in the range [0, 100]. Session - affinity options will slightly affect this routing behavior, - for more details, see: Session Affinity. This value can only - be set if the loadBalancingScheme in the BackendService is - set to EXTERNAL (when using the classic Application Load - Balancer) and the migration state is TEST_BY_PERCENTAGE. + by the Global external Application Load Balancer. + + The value of this field must be in the range [0, 100]. + + Session affinity options will slightly affect this routing + behavior, for more details, see:Session Affinity. + + This value can only be set if the loadBalancingScheme in the + BackendService is set to EXTERNAL (when using the classic + Application Load Balancer) and the migration state is + TEST_BY_PERCENTAGE. This field is a member of `oneof`_ ``_external_managed_migration_testing_percentage``. failover_policy (google.cloud.compute_v1beta.types.BackendServiceFailoverPolicy): @@ -17085,6 +20188,7 @@ class BackendService(proto.Message): Balancers `__ and `external passthrough Network Load Balancers `__. + failoverPolicy cannot be specified with haPolicy. This field is a member of `oneof`_ ``_failover_policy``. @@ -17096,34 +20200,46 @@ class BackendService(proto.Message): up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - BackendService. + conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a BackendService. This field is a member of `oneof`_ ``_fingerprint``. ha_policy (google.cloud.compute_v1beta.types.BackendServiceHAPolicy): Configures self-managed High Availability (HA) for External - and Internal Protocol Forwarding. The backends of this - regional backend service must only specify zonal network - endpoint groups (NEGs) of type GCE_VM_IP. When haPolicy is - set for an Internal Passthrough Network Load Balancer, the - regional backend service must set the network field. All - zonal NEGs must belong to the same network. However, - individual NEGs can belong to different subnetworks of that - network. When haPolicy is specified, the set of attached - network endpoints across all backends comprise an High - Availability domain from which one endpoint is selected as - the active endpoint (the leader) that receives all traffic. + and Internal Protocol Forwarding. + + The backends of this regional backend service must only + specify zonal network endpoint groups (NEGs) of type + GCE_VM_IP. + + When haPolicy is set for an Internal Passthrough Network + Load Balancer, the regional backend service must set the + network field. All zonal NEGs must belong to the same + network. However, individual NEGs can belong to different + subnetworks of that network. + + When haPolicy is specified, the set of attached network + endpoints across all backends comprise an High Availability + domain from which one endpoint is selected as the active + endpoint (the leader) that receives all traffic. + haPolicy can be added only at backend service creation time. - Once set up, it cannot be deleted. Note that haPolicy is not - for load balancing, and therefore cannot be specified with - sessionAffinity, connectionTrackingPolicy, and - failoverPolicy. haPolicy requires customers to be - responsible for tracking backend endpoint health and - electing a leader among the healthy endpoints. Therefore, - haPolicy cannot be specified with healthChecks. haPolicy can - only be specified for External Passthrough Network Load - Balancers and Internal Passthrough Network Load Balancers. + Once set up, it cannot be deleted. + + Note that haPolicy is not for load balancing, and therefore + cannot be specified with sessionAffinity, + connectionTrackingPolicy, and failoverPolicy. + + haPolicy requires customers to be responsible for tracking + backend endpoint health and electing a leader among the + healthy endpoints. Therefore, haPolicy cannot be specified + with healthChecks. + + haPolicy can only be specified for External Passthrough + Network Load Balancers and Internal Passthrough Network Load + Balancers. This field is a member of `oneof`_ ``_ha_policy``. health_checks (MutableSequence[str]): @@ -17136,6 +20252,7 @@ class BackendService(proto.Message): or zonal NEG backends must have a health check unless haPolicy is specified. Backend services with internet or serverless NEG backends must not have a health check. + healthChecks[] cannot be specified with haPolicy. iap (google.cloud.compute_v1beta.types.BackendServiceIAP): The configurations for Identity-Aware Proxy @@ -17152,29 +20269,41 @@ class BackendService(proto.Message): ip_address_selection_policy (str): Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless - gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 - traffic to the backends of the backend service (Instance - Group, Managed Instance Group, Network Endpoint Group), - regardless of traffic from the client to the proxy. Only - IPv4 health checks are used to check the health of the - backends. This is the default setting. - PREFER_IPV6: - Prioritize the connection to the endpoint's IPv6 address - over its IPv4 address (provided there is a healthy IPv6 - address). - IPV6_ONLY: Only send IPv6 traffic to the - backends of the backend service (Instance Group, Managed - Instance Group, Network Endpoint Group), regardless of - traffic from the client to the proxy. Only IPv6 health - checks are used to check the health of the backends. This - field is applicable to either: - Advanced global external - Application Load Balancer (load balancing scheme - EXTERNAL_MANAGED), - Regional external Application Load - Balancer, - Internal proxy Network Load Balancer (load - balancing scheme INTERNAL_MANAGED), - Regional internal - Application Load Balancer (load balancing scheme - INTERNAL_MANAGED), - Traffic Director with Envoy proxies and - proxyless gRPC (load balancing scheme - INTERNAL_SELF_MANAGED). Check the IpAddressSelectionPolicy - enum for the list of possible values. + gRPC). The possible values are: + + :: + + - IPV4_ONLY: Only send IPv4 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv4 + health checks are used to check the health of the backends. This is the + default setting. + - PREFER_IPV6: Prioritize the connection to the endpoint's + IPv6 address over its IPv4 address (provided there is a healthy IPv6 + address). + - IPV6_ONLY: Only send IPv6 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv6 + health checks are used to check the health of the backends. + + This field is applicable to either: + + :: + + - Advanced global external Application Load Balancer (load balancing + scheme EXTERNAL_MANAGED), + - Regional external Application Load + Balancer, + - Internal proxy Network Load Balancer (load balancing + scheme INTERNAL_MANAGED), + - Regional internal Application Load + Balancer (load balancing scheme INTERNAL_MANAGED), + - Traffic + Director with Envoy proxies and proxyless gRPC (load balancing scheme + INTERNAL_SELF_MANAGED). + + Check the IpAddressSelectionPolicy enum for the list of + possible values. This field is a member of `oneof`_ ``_ip_address_selection_policy``. kind (str): @@ -17186,7 +20315,8 @@ class BackendService(proto.Message): Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more - information, refer to Choosing a load balancer. + information, refer toChoosing + a load balancer. Check the LoadBalancingScheme enum for the list of possible values. @@ -17197,55 +20327,71 @@ class BackendService(proto.Message): must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies - overrides any value set in the localityLbPolicy field. For - an example of how to use this field, see Define a list of - preferred policies. Caution: This field and its children are - intended for use in a service mesh that includes gRPC - clients only. Envoy proxies can't use backend services that - have this configuration. + overrides any value set in the localityLbPolicy field. + + For an example of how to use this field, seeDefine a list of + preferred policies. + + Caution: This field and its children are intended for use in + a service mesh that includes gRPC clients only. Envoy + proxies can't use backend services that have this + configuration. locality_lb_policy (str): The load balancing algorithm used within the scope of the - locality. The possible values are: - ROUND_ROBIN: This is a - simple policy in which each healthy backend is selected in - round robin order. This is the default. - LEAST_REQUEST: An - O(1) algorithm which selects two random healthy hosts and - picks the host which has fewer active requests. - RING_HASH: - The ring/modulo hash load balancer implements consistent - hashing to backends. The algorithm has the property that the - addition/removal of a host from a set of N hosts only - affects 1/N of the requests. - RANDOM: The load balancer - selects a random healthy host. - ORIGINAL_DESTINATION: - Backend host is selected based on the client connection - metadata, i.e., connections are opened to the same address - as the destination address of the incoming connection before - the connection was redirected to the load balancer. - - MAGLEV: used as a drop in replacement for the ring hash load - balancer. Maglev is not as stable as ring hash but has - faster table lookup build times and host selection times. - For more information about Maglev, see Maglev: A Fast and - Reliable Software Network Load Balancer. - - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load - Balancing using weights computed from Backend reported - Custom Metrics. If set, the Backend Service responses are - expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to use for - computing the weights are specified via the customMetrics - field. This field is applicable to either: - A regional - backend service with the service_protocol set to HTTP, - HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - INTERNAL_MANAGED. - A global backend service with the - load_balancing_scheme set to INTERNAL_SELF_MANAGED, - INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is - not configured—that is, if session affinity remains at the - default value of NONE—then the default value for - localityLbPolicy is ROUND_ROBIN. If session affinity is set - to a value other than NONE, then the default value for - localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH - are supported when the backend service is referenced by a - URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. localityLbPolicy - cannot be specified with haPolicy. Check the - LocalityLbPolicy enum for the list of possible values. + locality. The possible values are: + + :: + + - ROUND_ROBIN: This is a simple policy in which each healthy + backend is selected in round robin order. This is the default. + - LEAST_REQUEST: An O(1) algorithm which + selects two random healthy hosts and picks the host which has fewer active + requests. + - RING_HASH: The ring/modulo hash load balancer implements + consistent hashing to backends. The algorithm has the property that the + addition/removal of a host from a set of N hosts only affects 1/N of the + requests. + - RANDOM: The load balancer selects a random healthy + host. + - ORIGINAL_DESTINATION: Backend host is selected + based on the client connection metadata, i.e., connections are opened to + the same address as the destination address of the incoming connection + before the connection was redirected to the load balancer. + - MAGLEV: used as a drop in replacement for the ring hash + load balancer. Maglev is not as stable as ring hash but has faster table + lookup build times and host selection times. For more information about + Maglev, see Maglev: + A Fast and Reliable Software Network Load Balancer. + - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin + Load Balancing using weights computed from Backend reported Custom Metrics. + If set, the Backend Service responses are expected to contain non-standard + HTTP response header field Endpoint-Load-Metrics. The reported + metrics to use for computing the weights are specified via thecustomMetrics field. + + This field is applicable to either: + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or + EXTERNAL_MANAGED. + + + If sessionAffinity is not configured—that is, if session + affinity remains at the default value of NONE—then the + default value for localityLbPolicy + is ROUND_ROBIN. If session affinity is set to a value other + than NONE, + then the default value for localityLbPolicy isMAGLEV. + + Only ROUND_ROBIN and RING_HASH are supported + when the backend service is referenced by a URL map that is bound to + target gRPC proxy that has validateForProxyless field set to true. + + localityLbPolicy cannot be specified with haPolicy. + + Check the LocalityLbPolicy enum for the list of possible + values. This field is a member of `oneof`_ ``_locality_lb_policy``. log_config (google.cloud.compute_v1beta.types.BackendServiceLogConfig): @@ -17260,12 +20406,17 @@ class BackendService(proto.Message): to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in - this duration is closed. If not specified, there will be no - timeout limit, i.e. the maximum duration is infinite. This - value can be overridden in the PathMatcher configuration of - the UrlMap that references this backend service. This field - is only allowed when the loadBalancingScheme of the backend - service is INTERNAL_SELF_MANAGED. + this duration is closed. + + If not specified, there will be no timeout limit, i.e. the + maximum duration is infinite. + + This value can be overridden in the PathMatcher + configuration of the UrlMap that references this backend + service. + + This field is only allowed when the loadBalancingScheme of + the backend service is INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_max_stream_duration``. metadatas (MutableMapping[str, str]): @@ -17275,7 +20426,7 @@ class BackendService(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -17285,20 +20436,23 @@ class BackendService(proto.Message): This field is a member of `oneof`_ ``_name``. network (str): The URL of the network to which this backend - service belongs. This field must be set for - Internal Passthrough Network Load Balancers when - the haPolicy is enabled, and for External - Passthrough Network Load Balancers when the - haPolicy fastIpMove is enabled. This field can - only be specified when the load balancing scheme - is set to INTERNAL, or when the load balancing - scheme is set to EXTERNAL and haPolicy - fastIpMove is enabled. + service belongs. + This field must be set for Internal Passthrough + Network Load Balancers when the haPolicy is + enabled, and for External Passthrough Network + Load Balancers when the haPolicy fastIpMove is + enabled. + + This field can only be specified when the load + balancing scheme is set toINTERNAL, or when the + load balancing scheme is set toEXTERNAL and + haPolicy fastIpMove is enabled. This field is a member of `oneof`_ ``_network``. network_pass_through_lb_traffic_policy (google.cloud.compute_v1beta.types.BackendServiceNetworkPassThroughLbTrafficPolicy): Configures traffic steering properties of internal passthrough Network Load Balancers. + networkPassThroughLbTrafficPolicy cannot be specified with haPolicy. @@ -17308,32 +20462,46 @@ class BackendService(proto.Message): endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered - disabled. Results of the outlier detection algorithm - (ejection of endpoints from the load balancing pool and - returning them back to the pool) are executed independently - by each proxy instance of the load balancer. In most cases, - more than one proxy instance handles the traffic received by - a backend service. Thus, it is possible that an unhealthy - endpoint is detected and ejected by only some of the - proxies, and while this happens, other proxies may continue - to send requests to the same unhealthy endpoint until they - detect and eject the unhealthy endpoint. Applicable backend - endpoints can be: - VM instances in an Instance Group - - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - - Endpoints in a Hybrid Connectivity NEG - (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to - Cloud Run, App Engine, or Cloud Functions Services - Private - Service Connect NEGs, that resolve to Google-managed - regional API endpoints or managed services published using - Private Service Connect Applicable backend service types can - be: - A global backend service with the loadBalancingScheme - set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A - regional backend service with the serviceProtocol set to - HTTP, HTTPS, HTTP2 or H2C, and loadBalancingScheme set to - INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for - Serverless NEGs. Not supported when the backend service is - referenced by a URL map that is bound to target gRPC proxy - that has validateForProxyless field set to true. + disabled. + + Results of the outlier detection algorithm (ejection of + endpoints from the load balancing pool and returning them + back to the pool) are executed independently by each proxy + instance of the load balancer. In most cases, more than one + proxy instance handles the traffic received by a backend + service. Thus, it is possible that an unhealthy endpoint is + detected and ejected by only some of the proxies, and while + this happens, other proxies may continue to send requests to + the same unhealthy endpoint until they detect and eject the + unhealthy endpoint. + + Applicable backend endpoints can be: + + :: + + - VM instances in an Instance Group + - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) + - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) + - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud + Functions Services + - Private Service Connect NEGs, that resolve to + Google-managed regional API endpoints or managed services published using + Private Service Connect + + Applicable backend service types can be: + + :: + + - A global backend service with the loadBalancingScheme set to + INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. + - A regional backend + service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and + loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not + supported for Serverless NEGs. + + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. This field is a member of `oneof`_ ``_outlier_detection``. params (google.cloud.compute_v1beta.types.BackendServiceParams): @@ -17361,16 +20529,20 @@ class BackendService(proto.Message): This field is a member of `oneof`_ ``_port_name``. protocol (str): The protocol this BackendService uses to - communicate with backends. Possible values are - HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC. - depending on the chosen load balancer or Traffic - Director configuration. Refer to the - documentation for the load balancers or for - Traffic Director for more information. Must be - set to GRPC when the backend service is + communicate with backends. + + Possible values are HTTP, HTTPS, HTTP2, H2C, + TCP, SSL, UDP or GRPC. depending on the chosen + load balancer or Traffic Director configuration. + Refer to the documentation for the load + balancers or for Traffic Director for more + information. + + Must be set to GRPC when the backend service is referenced by a URL map that is bound to target - gRPC proxy. Check the Protocol enum for the list - of possible values. + gRPC proxy. + Check the Protocol enum for the list of possible + values. This field is a member of `oneof`_ ``_protocol``. region (str): @@ -17398,23 +20570,29 @@ class BackendService(proto.Message): This field is a member of `oneof`_ ``_self_link``. service_bindings (MutableSequence[str]): - URLs of networkservices.ServiceBinding resources. Can only - be set if load balancing scheme is INTERNAL_SELF_MANAGED. If - set, lists of backends and health checks must be both empty. + URLs of networkservices.ServiceBinding resources. + + Can only be set if load balancing scheme is + INTERNAL_SELF_MANAGED. If set, lists of backends and health + checks must be both empty. service_lb_policy (str): - URL to networkservices.ServiceLbPolicy resource. Can only be - set if load balancing scheme is EXTERNAL_MANAGED, - INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is - global. + URL to networkservices.ServiceLbPolicy resource. + + Can only be set if load balancing scheme is + EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED + and the scope is global. This field is a member of `oneof`_ ``_service_lb_policy``. session_affinity (str): - Type of session affinity to use. The default is NONE. Only - NONE and HEADER_FIELD are supported when the backend service - is referenced by a URL map that is bound to target gRPC - proxy that has validateForProxyless field set to true. For - more details, see: `Session + Type of session affinity to use. The default is NONE. + + Only NONE and HEADER_FIELD are supported when the backend + service is referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field set to true. + + For more details, see: `Session Affinity `__. + sessionAffinity cannot be specified with haPolicy. Check the SessionAffinity enum for the list of possible values. @@ -17422,7 +20600,7 @@ class BackendService(proto.Message): strong_session_affinity_cookie (google.cloud.compute_v1beta.types.BackendServiceHttpCookie): Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the - sessionAffinity is set to STRONG_COOKIE_AFFINITY. + sessionAffinity is set toSTRONG_COOKIE_AFFINITY. This field is a member of `oneof`_ ``_strong_session_affinity_cookie``. subsetting (google.cloud.compute_v1beta.types.Subsetting): @@ -17433,11 +20611,15 @@ class BackendService(proto.Message): The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service - settings. The default is 30 seconds. The full - range of timeout values allowed goes from 1 - through 2,147,483,647 seconds. This value can be - overridden in the PathMatcher configuration of - the UrlMap that references this backend service. + settings. + The default is 30 seconds. + The full range of timeout values allowed goes + from 1 through 2,147,483,647 seconds. + + This value can be overridden in the PathMatcher + configuration of the UrlMap that references this + backend service. + Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field @@ -17478,18 +20660,21 @@ class CompressionMode(proto.Enum): class ExternalManagedMigrationState(proto.Enum): r"""Specifies the canary migration state. Possible values are PREPARE, - TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration - from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to - PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the - loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate traffic by - percentage using externalManagedMigrationTestingPercentage. Rolling - back a migration requires the states to be set in reverse order. So - changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the - state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate some traffic - back to EXTERNAL or PREPARE can be used to migrate all traffic back - to EXTERNAL. + TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state + must be changed to PREPARE. The state must be changed to + TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to + EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be + used to migrate traffic by percentage using + externalManagedMigrationTestingPercentage. + + Rolling back a migration requires the states to be set in reverse + order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL + requires the state to be set to TEST_ALL_TRAFFIC at the same time. + Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some + traffic back to EXTERNAL or PREPARE can be used to migrate all + traffic back to EXTERNAL. Values: UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE (0): @@ -17510,24 +20695,38 @@ class ExternalManagedMigrationState(proto.Enum): class IpAddressSelectionPolicy(proto.Enum): r"""Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The - possible values are: - IPV4_ONLY: Only send IPv4 traffic to the - backends of the backend service (Instance Group, Managed Instance - Group, Network Endpoint Group), regardless of traffic from the - client to the proxy. Only IPv4 health checks are used to check the - health of the backends. This is the default setting. - PREFER_IPV6: - Prioritize the connection to the endpoint's IPv6 address over its - IPv4 address (provided there is a healthy IPv6 address). - - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend - service (Instance Group, Managed Instance Group, Network Endpoint - Group), regardless of traffic from the client to the proxy. Only - IPv6 health checks are used to check the health of the backends. - This field is applicable to either: - Advanced global external - Application Load Balancer (load balancing scheme EXTERNAL_MANAGED), - - Regional external Application Load Balancer, - Internal proxy - Network Load Balancer (load balancing scheme INTERNAL_MANAGED), - - Regional internal Application Load Balancer (load balancing scheme - INTERNAL_MANAGED), - Traffic Director with Envoy proxies and - proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED). + possible values are: + + :: + + - IPV4_ONLY: Only send IPv4 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv4 + health checks are used to check the health of the backends. This is the + default setting. + - PREFER_IPV6: Prioritize the connection to the endpoint's + IPv6 address over its IPv4 address (provided there is a healthy IPv6 + address). + - IPV6_ONLY: Only send IPv6 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv6 + health checks are used to check the health of the backends. + + This field is applicable to either: + + :: + + - Advanced global external Application Load Balancer (load balancing + scheme EXTERNAL_MANAGED), + - Regional external Application Load + Balancer, + - Internal proxy Network Load Balancer (load balancing + scheme INTERNAL_MANAGED), + - Regional internal Application Load + Balancer (load balancing scheme INTERNAL_MANAGED), + - Traffic + Director with Envoy proxies and proxyless gRPC (load balancing scheme + INTERNAL_SELF_MANAGED). Values: UNDEFINED_IP_ADDRESS_SELECTION_POLICY (0): @@ -17562,9 +20761,10 @@ class IpAddressSelectionPolicy(proto.Enum): PREFER_IPV6 = 408601302 class LoadBalancingScheme(proto.Enum): - r"""Specifies the load balancer type. A backend service created - for one type of load balancer cannot be used with another. For - more information, refer to Choosing a load balancer. + r"""Specifies the load balancer type. A backend service + created for one type of load balancer cannot be used with + another. For more information, refer toChoosing + a load balancer. Values: UNDEFINED_LOAD_BALANCING_SCHEME (0): @@ -17602,41 +20802,57 @@ class LoadBalancingScheme(proto.Enum): class LocalityLbPolicy(proto.Enum): r"""The load balancing algorithm used within the scope of the locality. - The possible values are: - ROUND_ROBIN: This is a simple policy in - which each healthy backend is selected in round robin order. This is - the default. - LEAST_REQUEST: An O(1) algorithm which selects two - random healthy hosts and picks the host which has fewer active - requests. - RING_HASH: The ring/modulo hash load balancer implements - consistent hashing to backends. The algorithm has the property that - the addition/removal of a host from a set of N hosts only affects - 1/N of the requests. - RANDOM: The load balancer selects a random - healthy host. - ORIGINAL_DESTINATION: Backend host is selected based - on the client connection metadata, i.e., connections are opened to - the same address as the destination address of the incoming - connection before the connection was redirected to the load - balancer. - MAGLEV: used as a drop in replacement for the ring hash - load balancer. Maglev is not as stable as ring hash but has faster - table lookup build times and host selection times. For more - information about Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted - Round Robin Load Balancing using weights computed from Backend - reported Custom Metrics. If set, the Backend Service responses are - expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to use for computing the - weights are specified via the customMetrics field. This field is - applicable to either: - A regional backend service with the - service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and - load_balancing_scheme set to INTERNAL_MANAGED. - A global backend - service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not - configured—that is, if session affinity remains at the default value - of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. - If session affinity is set to a value other than NONE, then the - default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and - RING_HASH are supported when the backend service is referenced by a - URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. localityLbPolicy cannot be - specified with haPolicy. + The possible values are: + + :: + + - ROUND_ROBIN: This is a simple policy in which each healthy + backend is selected in round robin order. This is the default. + - LEAST_REQUEST: An O(1) algorithm which + selects two random healthy hosts and picks the host which has fewer active + requests. + - RING_HASH: The ring/modulo hash load balancer implements + consistent hashing to backends. The algorithm has the property that the + addition/removal of a host from a set of N hosts only affects 1/N of the + requests. + - RANDOM: The load balancer selects a random healthy + host. + - ORIGINAL_DESTINATION: Backend host is selected + based on the client connection metadata, i.e., connections are opened to + the same address as the destination address of the incoming connection + before the connection was redirected to the load balancer. + - MAGLEV: used as a drop in replacement for the ring hash + load balancer. Maglev is not as stable as ring hash but has faster table + lookup build times and host selection times. For more information about + Maglev, see Maglev: + A Fast and Reliable Software Network Load Balancer. + - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin + Load Balancing using weights computed from Backend reported Custom Metrics. + If set, the Backend Service responses are expected to contain non-standard + HTTP response header field Endpoint-Load-Metrics. The reported + metrics to use for computing the weights are specified via thecustomMetrics field. + + This field is applicable to either: + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or + EXTERNAL_MANAGED. + + + If sessionAffinity is not configured—that is, if session + affinity remains at the default value of NONE—then the + default value for localityLbPolicy + is ROUND_ROBIN. If session affinity is set to a value other + than NONE, + then the default value for localityLbPolicy isMAGLEV. + + Only ROUND_ROBIN and RING_HASH are supported + when the backend service is referenced by a URL map that is bound to + target gRPC proxy that has validateForProxyless field set to true. + + localityLbPolicy cannot be specified with haPolicy. Values: UNDEFINED_LOCALITY_LB_POLICY (0): @@ -17655,8 +20871,10 @@ class LocalityLbPolicy(proto.Enum): Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about - Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. + Maglev, seeMaglev: + + A Fast and Reliable Software Network Load + Balancer. ORIGINAL_DESTINATION (166297216): Backend host is selected based on the client connection metadata, i.e., connections are @@ -17680,9 +20898,9 @@ class LocalityLbPolicy(proto.Enum): Per-instance weighted Load Balancing via health check reported weights. In internal passthrough network load balancing, it is - weighted rendezvous hashing. This option is only - supported in internal passthrough network load - balancing. + weighted rendezvous hashing. + This option is only supported in internal + passthrough network load balancing. WEIGHTED_MAGLEV (254930962): Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure @@ -17701,9 +20919,9 @@ class LocalityLbPolicy(proto.Enum): reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to - use for computing the weights are specified via - the customMetrics fields. + Endpoint-Load-Metrics. The reported metrics + to use for computing the weights are specified + via the customMetrics fields. """ UNDEFINED_LOCALITY_LB_POLICY = 0 INVALID_LB_POLICY = 323318707 @@ -17718,13 +20936,16 @@ class LocalityLbPolicy(proto.Enum): WEIGHTED_ROUND_ROBIN = 5584977 class Protocol(proto.Enum): - r"""The protocol this BackendService uses to communicate with - backends. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, - UDP or GRPC. depending on the chosen load balancer or Traffic - Director configuration. Refer to the documentation for the load - balancers or for Traffic Director for more information. Must be - set to GRPC when the backend service is referenced by a URL map - that is bound to target gRPC proxy. + r"""The protocol this BackendService uses to communicate + with backends. + + Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or + GRPC. depending on the chosen load balancer or Traffic Director + configuration. Refer to the documentation for the load balancers + or for Traffic Director for more information. + + Must be set to GRPC when the backend service is referenced by a + URL map that is bound to target gRPC proxy. Values: UNDEFINED_PROTOCOL (0): @@ -17763,12 +20984,15 @@ class Protocol(proto.Enum): UNSPECIFIED = 526786327 class SessionAffinity(proto.Enum): - r"""Type of session affinity to use. The default is NONE. Only NONE and - HEADER_FIELD are supported when the backend service is referenced by - a URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. For more details, see: - `Session + r"""Type of session affinity to use. The default is NONE. + + Only NONE and HEADER_FIELD are supported when the backend service is + referenced by a URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. + + For more details, see: `Session Affinity `__. + sessionAffinity cannot be specified with haPolicy. Values: @@ -18135,7 +21359,7 @@ class BackendServiceAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -18215,23 +21439,25 @@ class BackendServiceCdnPolicy(proto.Message): This field is a member of `oneof`_ ``_cache_key_policy``. cache_mode (str): Specifies the cache setting for all responses from this - backend. The possible values are: USE_ORIGIN_HEADERS - Requires the origin to set valid caching headers to cache - content. Responses without these headers will not be cached - at Google's edge, and will require a full trip to the origin - on every request, potentially impacting performance and - increasing load on the origin server. FORCE_CACHE_ALL Cache + backend. The possible values are:USE_ORIGIN_HEADERS Requires + the origin to set valid caching headers to cache content. + Responses without these headers will not be cached at + Google's edge, and will require a full trip to the origin on + every request, potentially impacting performance and + increasing load on the origin server.FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC + per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), - will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. Check - the CacheMode enum for the list of possible values. + will not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults + to CACHE_ALL_STATIC. Check the CacheMode enum for the list + of possible values. This field is a member of `oneof`_ ``_cache_mode``. client_ttl (int): @@ -18264,17 +21490,19 @@ class BackendServiceCdnPolicy(proto.Message): This field is a member of `oneof`_ ``_default_ttl``. max_ttl (int): Specifies the maximum allowed TTL for cached - content served by this origin. Cache directives - that attempt to set a max-age or s-maxage higher - than this, or an Expires header more than maxTTL - seconds in the future will be capped at the - value of maxTTL, as if it were the value of an - s-maxage Cache-Control directive. Headers sent - to the client will not be modified. Setting a - TTL of "0" means "always revalidate". The - maximum allowed value is 31,622,400s (1 year), - noting that infrequently accessed objects may be - evicted from the cache before the defined TTL. + content served by this origin. + Cache directives that attempt to set a max-age + or s-maxage higher than this, or an Expires + header more than maxTTL seconds in the future + will be capped at the value of maxTTL, as if it + were the value of an s-maxage Cache-Control + directive. + Headers sent to the client will not be modified. + Setting a TTL of "0" means "always revalidate". + The maximum allowed value is 31,622,400s (1 + year), noting that infrequently accessed objects + may be evicted from the cache before the defined + TTL. This field is a member of `oneof`_ ``_max_ttl``. negative_caching (bool): @@ -18317,16 +21545,17 @@ class BackendServiceCdnPolicy(proto.Message): Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when - refreshing the cache. This setting defines the - default "max-stale" duration for any cached - responses that do not specify a max-stale - directive. Stale responses that exceed the TTL - configured here will not be served. The default - limit (max-stale) is 86400s (1 day), which will - allow stale content to be served up to this - limit beyond the max-age (or s-maxage) of a - cached response. The maximum allowed value is - 604800 (1 week). Set this to zero (0) to disable + refreshing the cache. + This setting defines the default "max-stale" + duration for any cached responses that do not + specify a max-stale directive. Stale responses + that exceed the TTL configured here will not be + served. The default limit (max-stale) is 86400s + (1 day), which will allow stale content to be + served up to this limit beyond the max-age (or + s-maxage) of a cached response. + The maximum allowed value is 604800 (1 week). + Set this to zero (0) to disable serve-while-stale. This field is a member of `oneof`_ ``_serve_while_stale``. @@ -18348,20 +21577,22 @@ class BackendServiceCdnPolicy(proto.Message): class CacheMode(proto.Enum): r"""Specifies the cache setting for all responses from this backend. The - possible values are: USE_ORIGIN_HEADERS Requires the origin to set + possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting - performance and increasing load on the origin server. - FORCE_CACHE_ALL Cache all content, ignoring any "private", - "no-store" or "no-cache" directives in Cache-Control response - headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC Automatically - cache static content, including common image formats, media (video - and audio), and web assets (JavaScript and CSS). Requests and - responses that are marked as uncacheable, as well as dynamic content - (including HTML), will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. + performance and increasing load on the origin server.FORCE_CACHE_ALL + Cache all content, ignoring any "private", "no-store" or "no-cache" + directives in Cache-Control response headers. Warning: this may + result in Cloud CDN caching private, per-user (user identifiable) + content.CACHE_ALL_STATIC Automatically cache static content, + including common image formats, media (video and audio), and web + assets (JavaScript and CSS). Requests and responses that are marked + as uncacheable, as well as dynamic content (including HTML), will + not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults to + CACHE_ALL_STATIC. Values: UNDEFINED_CACHE_MODE (0): @@ -18495,9 +21726,9 @@ class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): code (int): The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, - 404, 405, 410, 421, 451 and 501 are can be - specified as values, and you cannot specify a - status code more than once. + 404, 405, 410, 421, 451 and 501 can be specified + as values, and you cannot specify a status code + more than once. This field is a member of `oneof`_ ``_code``. ttl (int): @@ -18530,21 +21761,28 @@ class BackendServiceConnectionTrackingPolicy(proto.Message): Attributes: connection_persistence_on_unhealthy_backends (str): Specifies connection persistence when backends are - unhealthy. The default value is DEFAULT_FOR_PROTOCOL. If set - to DEFAULT_FOR_PROTOCOL, the existing connections persist on - unhealthy backends only for connection-oriented protocols - (TCP and SCTP) and only if the Tracking Mode is - PER_CONNECTION (default tracking mode) or the Session - Affinity is configured for 5-tuple. They do not persist for - UDP. If set to NEVER_PERSIST, after a backend becomes - unhealthy, the existing connections on the unhealthy backend - are never persisted on the unhealthy backend. They are - always diverted to newly selected healthy backends (unless - all backends are unhealthy). If set to ALWAYS_PERSIST, - existing connections always persist on unhealthy backends - regardless of protocol and session affinity. It is generally - not recommended to use this mode overriding the default. For - more details, see `Connection Persistence for Network Load + unhealthy. The default value is DEFAULT_FOR_PROTOCOL. + + If set to DEFAULT_FOR_PROTOCOL, the existing connections + persist on unhealthy backends only for connection-oriented + protocols (TCP and SCTP) and only if the Tracking Mode + isPER_CONNECTION (default tracking mode) or the Session + Affinity is configured for 5-tuple. They do not persist + forUDP. + + If set to NEVER_PERSIST, after a backend becomes unhealthy, + the existing connections on the unhealthy backend are never + persisted on the unhealthy backend. They are always diverted + to newly selected healthy backends (unless all backends are + unhealthy). + + If set to ALWAYS_PERSIST, existing connections always + persist on unhealthy backends regardless of protocol and + session affinity. It is generally not recommended to use + this mode overriding the default. + + For more details, see `Connection Persistence for Network + Load Balancing `__ and `Connection Persistence for Internal TCP/UDP Load Balancing `__. @@ -18560,25 +21798,35 @@ class BackendServiceConnectionTrackingPolicy(proto.Message): This field is a member of `oneof`_ ``_enable_strong_affinity``. idle_timeout_sec (int): Specifies how long to keep a Connection Tracking entry while - there is no matching traffic (in seconds). For internal - passthrough Network Load Balancers: - The minimum (default) - is 10 minutes and the maximum is 16 hours. - It can be set - only if Connection Tracking is less than 5-tuple (i.e. - Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or - CLIENT_IP_PROTO, and Tracking Mode is PER_SESSION). For - external passthrough Network Load Balancers the default is - 60 seconds. This option is not available publicly. + there is no matching traffic (in seconds). + + For internal passthrough Network Load Balancers: + + :: + + - The minimum (default) is 10 minutes and the maximum is 16 hours. + - It can be set only if Connection Tracking is less than 5-tuple + (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or CLIENT_IP_PROTO, and Tracking + Mode is PER_SESSION). + + For external passthrough Network Load Balancers the default + is 60 seconds. This option is not available publicly. This field is a member of `oneof`_ ``_idle_timeout_sec``. tracking_mode (str): Specifies the key used for connection tracking. There are - two options: - PER_CONNECTION: This is the default mode. The - Connection Tracking is performed as per the Connection Key - (default Hash Method) for the specific protocol. - - PER_SESSION: The Connection Tracking is performed as per the - configured Session Affinity. It matches the configured - Session Affinity. For more details, see `Tracking Mode for - Network Load + two options: + + :: + + - PER_CONNECTION: This is the default mode. The Connection + Tracking is performed as per the Connection Key (default Hash Method) for + the specific protocol. + - PER_SESSION: The Connection Tracking is performed as per + the configured Session Affinity. It matches the configured Session + Affinity. + + For more details, see `Tracking Mode for Network Load Balancing `__ and `Tracking Mode for Internal TCP/UDP Load Balancing `__. @@ -18589,20 +21837,25 @@ class BackendServiceConnectionTrackingPolicy(proto.Message): class ConnectionPersistenceOnUnhealthyBackends(proto.Enum): r"""Specifies connection persistence when backends are unhealthy. The - default value is DEFAULT_FOR_PROTOCOL. If set to - DEFAULT_FOR_PROTOCOL, the existing connections persist on unhealthy - backends only for connection-oriented protocols (TCP and SCTP) and - only if the Tracking Mode is PER_CONNECTION (default tracking mode) - or the Session Affinity is configured for 5-tuple. They do not - persist for UDP. If set to NEVER_PERSIST, after a backend becomes - unhealthy, the existing connections on the unhealthy backend are - never persisted on the unhealthy backend. They are always diverted - to newly selected healthy backends (unless all backends are - unhealthy). If set to ALWAYS_PERSIST, existing connections always - persist on unhealthy backends regardless of protocol and session - affinity. It is generally not recommended to use this mode - overriding the default. For more details, see `Connection - Persistence for Network Load + default value is DEFAULT_FOR_PROTOCOL. + + If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on + unhealthy backends only for connection-oriented protocols (TCP and + SCTP) and only if the Tracking Mode isPER_CONNECTION (default + tracking mode) or the Session Affinity is configured for 5-tuple. + They do not persist forUDP. + + If set to NEVER_PERSIST, after a backend becomes unhealthy, the + existing connections on the unhealthy backend are never persisted on + the unhealthy backend. They are always diverted to newly selected + healthy backends (unless all backends are unhealthy). + + If set to ALWAYS_PERSIST, existing connections always persist on + unhealthy backends regardless of protocol and session affinity. It + is generally not recommended to use this mode overriding the + default. + + For more details, see `Connection Persistence for Network Load Balancing `__ and `Connection Persistence for Internal TCP/UDP Load Balancing `__. @@ -18625,12 +21878,18 @@ class ConnectionPersistenceOnUnhealthyBackends(proto.Enum): class TrackingMode(proto.Enum): r"""Specifies the key used for connection tracking. There are two - options: - PER_CONNECTION: This is the default mode. The Connection - Tracking is performed as per the Connection Key (default Hash - Method) for the specific protocol. - PER_SESSION: The Connection - Tracking is performed as per the configured Session Affinity. It - matches the configured Session Affinity. For more details, see - `Tracking Mode for Network Load + options: + + :: + + - PER_CONNECTION: This is the default mode. The Connection + Tracking is performed as per the Connection Key (default Hash Method) for + the specific protocol. + - PER_SESSION: The Connection Tracking is performed as per + the configured Session Affinity. It matches the configured Session + Affinity. + + For more details, see `Tracking Mode for Network Load Balancing `__ and `Tracking Mode for Internal TCP/UDP Load Balancing `__. @@ -18687,15 +21946,15 @@ class BackendServiceCustomMetric(proto.Message): name (str): Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression - `a-z <[-_.a-z0-9]*[a-z0-9]>`__? which means that the first + ``[a-z]([-_.a-z0-9]*[a-z0-9])?`` which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the - loadBalancingScheme set to EXTERNAL_MANAGED, - INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED + INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_name``. """ @@ -18779,7 +22038,8 @@ class BackendServiceFailoverPolicy(proto.Message): Attributes: disable_connection_drain_on_failover (bool): This can be set to true only if the protocol - is TCP. The default is false. + isTCP. + The default is false. This field is a member of `oneof`_ ``_disable_connection_drain_on_failover``. drop_traffic_if_unhealthy (bool): @@ -18796,7 +22056,7 @@ class BackendServiceFailoverPolicy(proto.Message): This field is a member of `oneof`_ ``_drop_traffic_if_unhealthy``. failover_ratio (float): - The value of the field must be in the range [0, 1]. If the + The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total @@ -18842,9 +22102,9 @@ class BackendServiceGroupHealth(proto.Message): endpoint group, determined based on configured health checks. kind (str): - [Output Only] Type of resource. Always - compute#backendServiceGroupHealth for the health of backend - services. + [Output Only] Type of resource. + Alwayscompute#backendServiceGroupHealth for the health of + backend services. This field is a member of `oneof`_ ``_kind``. """ @@ -18874,141 +22134,182 @@ class BackendServiceHAPolicy(proto.Message): Attributes: fast_i_p_move (str): Specifies whether fast IP move is enabled, and if so, the - mechanism to achieve it. Supported values are: - DISABLED: - Fast IP Move is disabled. You can only use the - haPolicy.leader API to update the leader. - >GARP_RA: - Provides a method to very quickly define a new network - endpoint as the leader. This method is faster than updating - the leader using the haPolicy.leader API. Fast IP move works - as follows: The VM hosting the network endpoint that should - become the new leader sends either a Gratuitous ARP (GARP) - packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet - (IPv6). Google Cloud immediately but temporarily associates - the forwarding rule IP address with that VM, and both new - and in-flight packets are quickly delivered to that VM. Note - the important properties of the Fast IP Move functionality: - - The GARP/RA-initiated re-routing stays active for - approximately 20 minutes. After triggering fast failover, - you must also appropriately set the haPolicy.leader. - The - new leader instance should continue to send GARP/RA packets - periodically every 10 seconds until at least 10 minutes - after updating the haPolicy.leader (but stop immediately if - it is no longer the leader). - After triggering a fast - failover, we recommend that you wait at least 3 seconds - before sending another GARP/RA packet from a different VM - instance to avoid race conditions. - Don't send GARP/RA - packets from different VM instances at the same time. If - multiple instances continue to send GARP/RA packets, traffic - might be routed to different destinations in an alternating - order. This condition ceases when a single instance issues a - GARP/RA packet. - The GARP/RA request always takes priority - over the leader API. Using the haPolicy.leader API to change - the leader to a different instance will have no effect until - the GARP/RA request becomes inactive. - The GARP/RA packets - should follow the GARP/RA Packet Specifications.. - When - multiple forwarding rules refer to a regional backend - service, you need only send a GARP or RA packet for a single - forwarding rule virtual IP. The virtual IPs for all - forwarding rules targeting the same backend service will - also be moved to the sender of the GARP or RA packet. The - following are the Fast IP Move limitations (that is, when - fastIPMove is not DISABLED): - Multiple forwarding rules - cannot use the same IP address if one of them refers to a - regional backend service with fastIPMove. - The regional - backend service must set the network field, and all NEGs - must belong to that network. However, individual NEGs can - belong to different subnetworks of that network. - The - maximum number of network endpoints across all backends of a - backend service with fastIPMove is 32. - The maximum number - of backend services with fastIPMove that can have the same - network endpoint attached to one of its backends is 64. - - The maximum number of backend services with fastIPMove in a - VPC in a region is 64. - The network endpoints that are - attached to a backend of a backend service with fastIPMove - cannot resolve to Gen3+ machines for IPv6. - Traffic - directed to the leader by a static route next hop will not - be redirected to a new leader by fast failover. Such traffic - will only be redirected once an haPolicy.leader update has - taken effect. Only traffic to the forwarding rule's virtual - IP will be redirected to a new leader by fast failover. + mechanism to achieve it. + + Supported values are: + + :: + + - DISABLED: Fast IP Move is disabled. You can only use the + haPolicy.leader API to update the leader. + - >GARP_RA: Provides a method to very quickly define a new network + endpoint as the leader. This method is faster than updating the leader + using the haPolicy.leader API. Fast IP move works as follows: The VM + hosting the network endpoint that should become the new leader sends + either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router + Advertisement(RA) packet (IPv6). Google Cloud immediately but + temporarily associates the forwarding rule IP address with that VM, and + both new and in-flight packets are quickly delivered to that VM. + + Note the important properties of the Fast IP Move + functionality: + + :: + + - The GARP/RA-initiated re-routing stays active for approximately 20 + minutes. After triggering fast failover, you must also + appropriately set the haPolicy.leader. + - The new leader instance should continue to send GARP/RA packets + periodically every 10 seconds until at least 10 minutes after updating + the haPolicy.leader (but stop immediately if it is no longer the leader). + - After triggering a fast failover, we recommend that you wait at least + 3 seconds before sending another GARP/RA packet from a different VM + instance to avoid race conditions. + - Don't send GARP/RA packets from different VM + instances at the same time. If multiple instances continue to send + GARP/RA packets, traffic might be routed to different destinations in an + alternating order. This condition ceases when a single instance + issues a GARP/RA packet. + - The GARP/RA request always takes priority over the leader API. + Using the haPolicy.leader API to change the leader to a different + instance will have no effect until the GARP/RA request becomes + inactive. + - The GARP/RA packets should follow the GARP/RA + Packet Specifications.. + - When multiple forwarding rules refer to a regional backend service, + you need only send a GARP or RA packet for a single forwarding rule + virtual IP. The virtual IPs for all forwarding rules targeting the same + backend service will also be moved to the sender of the GARP or RA + packet. + + The following are the Fast IP Move limitations (that is, + when fastIPMove is not DISABLED): + + :: + + - Multiple forwarding rules cannot use the same IP address if one of + them refers to a regional backend service with fastIPMove. + - The regional backend service must set the network field, and all + NEGs must belong to that network. However, individual + NEGs can belong to different subnetworks of that network. + - The maximum number of network endpoints across all backends of a + backend service with fastIPMove is 32. + - The maximum number of backend services with fastIPMove that can have + the same network endpoint attached to one of its backends is 64. + - The maximum number of backend services with fastIPMove in a VPC in a + region is 64. + - The network endpoints that are attached to a backend of a backend + service with fastIPMove cannot resolve to Gen3+ machines for IPv6. + - Traffic directed to the leader by a static route next hop will not be + redirected to a new leader by fast failover. Such traffic will only be + redirected once an haPolicy.leader update has taken effect. Only traffic + to the forwarding rule's virtual IP will be redirected to a new leader by + fast failover. + haPolicy.fastIPMove can be set only at backend service - creation time. Once set, it cannot be updated. By default, - fastIpMove is set to DISABLED. Check the FastIPMove enum for - the list of possible values. + creation time. Once set, it cannot be updated. + + By default, fastIpMove is set to DISABLED. Check the + FastIPMove enum for the list of possible values. This field is a member of `oneof`_ ``_fast_i_p_move``. leader (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeader): Selects one of the network endpoints attached to the backend NEGs of this service as the active endpoint (the leader) that receives all - traffic. When the leader changes, there is no - connection draining to persist existing - connections on the old leader. You are - responsible for selecting a suitable endpoint as - the leader. For example, preferring a healthy - endpoint over unhealthy ones. Note that this - service does not track backend endpoint health, - and selects the configured leader - unconditionally. + traffic. + + When the leader changes, there is no connection + draining to persist existing connections on the + old leader. + + You are responsible for selecting a suitable + endpoint as the leader. For example, preferring + a healthy endpoint over unhealthy ones. Note + that this service does not track backend + endpoint health, and selects the configured + leader unconditionally. This field is a member of `oneof`_ ``_leader``. """ class FastIPMove(proto.Enum): r"""Specifies whether fast IP move is enabled, and if so, the mechanism - to achieve it. Supported values are: - DISABLED: Fast IP Move is - disabled. You can only use the haPolicy.leader API to update the - leader. - >GARP_RA: Provides a method to very quickly define a new - network endpoint as the leader. This method is faster than updating - the leader using the haPolicy.leader API. Fast IP move works as - follows: The VM hosting the network endpoint that should become the - new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an - ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud - immediately but temporarily associates the forwarding rule IP - address with that VM, and both new and in-flight packets are quickly - delivered to that VM. Note the important properties of the Fast IP - Move functionality: - The GARP/RA-initiated re-routing stays active - for approximately 20 minutes. After triggering fast failover, you - must also appropriately set the haPolicy.leader. - The new leader - instance should continue to send GARP/RA packets periodically every - 10 seconds until at least 10 minutes after updating the - haPolicy.leader (but stop immediately if it is no longer the - leader). - After triggering a fast failover, we recommend that you - wait at least 3 seconds before sending another GARP/RA packet from a - different VM instance to avoid race conditions. - Don't send GARP/RA - packets from different VM instances at the same time. If multiple - instances continue to send GARP/RA packets, traffic might be routed - to different destinations in an alternating order. This condition - ceases when a single instance issues a GARP/RA packet. - The GARP/RA - request always takes priority over the leader API. Using the - haPolicy.leader API to change the leader to a different instance - will have no effect until the GARP/RA request becomes inactive. - - The GARP/RA packets should follow the GARP/RA Packet - Specifications.. - When multiple forwarding rules refer to a - regional backend service, you need only send a GARP or RA packet for - a single forwarding rule virtual IP. The virtual IPs for all - forwarding rules targeting the same backend service will also be - moved to the sender of the GARP or RA packet. The following are the - Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - - Multiple forwarding rules cannot use the same IP address if one of - them refers to a regional backend service with fastIPMove. - The - regional backend service must set the network field, and all NEGs - must belong to that network. However, individual NEGs can belong to - different subnetworks of that network. - The maximum number of - network endpoints across all backends of a backend service with - fastIPMove is 32. - The maximum number of backend services with - fastIPMove that can have the same network endpoint attached to one - of its backends is 64. - The maximum number of backend services with - fastIPMove in a VPC in a region is 64. - The network endpoints that - are attached to a backend of a backend service with fastIPMove - cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the - leader by a static route next hop will not be redirected to a new - leader by fast failover. Such traffic will only be redirected once - an haPolicy.leader update has taken effect. Only traffic to the - forwarding rule's virtual IP will be redirected to a new leader by - fast failover. haPolicy.fastIPMove can be set only at backend - service creation time. Once set, it cannot be updated. By default, - fastIpMove is set to DISABLED. + to achieve it. + + Supported values are: + + :: + + - DISABLED: Fast IP Move is disabled. You can only use the + haPolicy.leader API to update the leader. + - >GARP_RA: Provides a method to very quickly define a new network + endpoint as the leader. This method is faster than updating the leader + using the haPolicy.leader API. Fast IP move works as follows: The VM + hosting the network endpoint that should become the new leader sends + either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router + Advertisement(RA) packet (IPv6). Google Cloud immediately but + temporarily associates the forwarding rule IP address with that VM, and + both new and in-flight packets are quickly delivered to that VM. + + Note the important properties of the Fast IP Move functionality: + + :: + + - The GARP/RA-initiated re-routing stays active for approximately 20 + minutes. After triggering fast failover, you must also + appropriately set the haPolicy.leader. + - The new leader instance should continue to send GARP/RA packets + periodically every 10 seconds until at least 10 minutes after updating + the haPolicy.leader (but stop immediately if it is no longer the leader). + - After triggering a fast failover, we recommend that you wait at least + 3 seconds before sending another GARP/RA packet from a different VM + instance to avoid race conditions. + - Don't send GARP/RA packets from different VM + instances at the same time. If multiple instances continue to send + GARP/RA packets, traffic might be routed to different destinations in an + alternating order. This condition ceases when a single instance + issues a GARP/RA packet. + - The GARP/RA request always takes priority over the leader API. + Using the haPolicy.leader API to change the leader to a different + instance will have no effect until the GARP/RA request becomes + inactive. + - The GARP/RA packets should follow the GARP/RA + Packet Specifications.. + - When multiple forwarding rules refer to a regional backend service, + you need only send a GARP or RA packet for a single forwarding rule + virtual IP. The virtual IPs for all forwarding rules targeting the same + backend service will also be moved to the sender of the GARP or RA + packet. + + The following are the Fast IP Move limitations (that is, when + fastIPMove is not DISABLED): + + :: + + - Multiple forwarding rules cannot use the same IP address if one of + them refers to a regional backend service with fastIPMove. + - The regional backend service must set the network field, and all + NEGs must belong to that network. However, individual + NEGs can belong to different subnetworks of that network. + - The maximum number of network endpoints across all backends of a + backend service with fastIPMove is 32. + - The maximum number of backend services with fastIPMove that can have + the same network endpoint attached to one of its backends is 64. + - The maximum number of backend services with fastIPMove in a VPC in a + region is 64. + - The network endpoints that are attached to a backend of a backend + service with fastIPMove cannot resolve to Gen3+ machines for IPv6. + - Traffic directed to the leader by a static route next hop will not be + redirected to a new leader by fast failover. Such traffic will only be + redirected once an haPolicy.leader update has taken effect. Only traffic + to the forwarding rule's virtual IP will be redirected to a new leader by + fast failover. + + haPolicy.fastIPMove can be set only at backend service creation + time. Once set, it cannot be updated. + + By default, fastIpMove is set to DISABLED. Values: UNDEFINED_FAST_I_P_MOVE (0): @@ -19046,17 +22347,20 @@ class BackendServiceHAPolicyLeader(proto.Message): A fully-qualified URL (starting with https://www.googleapis.com/) of the zonal Network Endpoint Group (NEG) with ``GCE_VM_IP`` endpoints that the leader is - attached to. The leader's backendGroup must already be - specified as a backend of this backend service. Removing a - backend that is designated as the leader's backendGroup is - not permitted. + attached to. + + The leader's backendGroup must already be specified as a + backend of this backend service. Removing a backend that is + designated as the leader's backendGroup is not permitted. This field is a member of `oneof`_ ``_backend_group``. network_endpoint (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeaderNetworkEndpoint): The network endpoint within the leader.backendGroup that is designated as the - leader. This network endpoint cannot be detached - from the NEG specified in the + leader. + + This network endpoint cannot be detached from + the NEG specified in the haPolicy.leader.backendGroup until the leader is updated with another network endpoint, or the leader is removed from the haPolicy. @@ -19087,11 +22391,12 @@ class BackendServiceHAPolicyLeaderNetworkEndpoint(proto.Message): The name of the VM instance of the leader network endpoint. The instance must already be attached to the NEG specified in the - haPolicy.leader.backendGroup. The name must be - 1-63 characters long, and comply with RFC1035. - Authorization requires the following IAM - permission on the specified resource instance: - compute.instances.use + haPolicy.leader.backendGroup. + + The name must be 1-63 characters long, and + comply with RFC1035. Authorization requires the + following IAM permission on the specified + resource instance: compute.instances.use This field is a member of `oneof`_ ``_instance``. """ @@ -19163,7 +22468,9 @@ class BackendServiceIAP(proto.Message): authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the - oauth2ClientSecretSha256 field. @InputOnly + oauth2ClientSecretSha256 field. + + @InputOnly This field is a member of `oneof`_ ``_oauth2_client_secret``. oauth2_client_secret_sha256 (str): @@ -19209,14 +22516,15 @@ class BackendServiceList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): A list of BackendService resources. kind (str): - [Output Only] Type of resource. Always - compute#backendServiceList for lists of backend services. + [Output Only] Type of resource. + Alwayscompute#backendServiceList for lists of backend + services. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -19283,15 +22591,15 @@ class BackendServiceListUsable(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): A list of BackendService resources. kind (str): - [Output Only] Type of resource. Always - compute#usableBackendServiceList for lists of usable backend - services. + [Output Only] Type of resource. + Alwayscompute#usableBackendServiceList for lists of usable + backend services. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -19391,16 +22699,21 @@ class BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy(proto.Message) This field is a member of `oneof`_ ``_data``. name (str): - Identifies the custom policy. The value - should match the name of a custom implementation - registered on the gRPC clients. It should follow - protocol buffer message naming conventions and - include the full path (for example, - myorg.CustomLbPolicy). The maximum length is 256 - characters. Do not specify the same custom - policy more than once for a backend. If you do, - the configuration is rejected. For an example of - how to use this field, see Use a custom policy. + Identifies the custom policy. + + The value should match the name of a custom + implementation registered on the gRPC clients. + It should follow protocol buffer message naming + conventions and include the full path (for + example, myorg.CustomLbPolicy). The maximum + length is 256 characters. + + Do not specify the same custom policy more than + once for a backend. If you do, the configuration + is rejected. + + For an example of how to use this field, seeUse + a custom policy. This field is a member of `oneof`_ ``_name``. """ @@ -19427,10 +22740,11 @@ class BackendServiceLocalityLoadBalancingPolicyConfigPolicy(proto.Message): The name of a locality load-balancing policy. Valid values include ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information about these values, see the description of - localityLbPolicy. Do not specify the same policy more than - once for a backend. If you do, the configuration is - rejected. Check the Name enum for the list of possible - values. + localityLbPolicy. + + Do not specify the same policy more than once for a backend. + If you do, the configuration is rejected. Check the Name + enum for the list of possible values. This field is a member of `oneof`_ ``_name``. """ @@ -19438,9 +22752,10 @@ class BackendServiceLocalityLoadBalancingPolicyConfigPolicy(proto.Message): class Name(proto.Enum): r"""The name of a locality load-balancing policy. Valid values include ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information - about these values, see the description of localityLbPolicy. Do not - specify the same policy more than once for a backend. If you do, the - configuration is rejected. + about these values, see the description of localityLbPolicy. + + Do not specify the same policy more than once for a backend. If you + do, the configuration is rejected. Values: UNDEFINED_NAME (0): @@ -19459,8 +22774,10 @@ class Name(proto.Enum): Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about - Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. + Maglev, seeMaglev: + + A Fast and Reliable Software Network Load + Balancer. ORIGINAL_DESTINATION (166297216): Backend host is selected based on the client connection metadata, i.e., connections are @@ -19484,9 +22801,9 @@ class Name(proto.Enum): Per-instance weighted Load Balancing via health check reported weights. In internal passthrough network load balancing, it is - weighted rendezvous hashing. This option is only - supported in internal passthrough network load - balancing. + weighted rendezvous hashing. + This option is only supported in internal + passthrough network load balancing. WEIGHTED_MAGLEV (254930962): Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure @@ -19505,9 +22822,9 @@ class Name(proto.Enum): reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to - use for computing the weights are specified via - the customMetrics fields. + Endpoint-Load-Metrics. The reported metrics + to use for computing the weights are specified + via the customMetrics fields. """ UNDEFINED_NAME = 0 INVALID_LB_POLICY = 323318707 @@ -19548,6 +22865,7 @@ class BackendServiceLogConfig(proto.Message): "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: + serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace optional_mode (str): @@ -19646,22 +22964,26 @@ class BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity(proto.Message Attributes: spillover (str): This field indicates whether zonal affinity is enabled or - not. The possible values are: - ZONAL_AFFINITY_DISABLED: - Default Value. Zonal Affinity is disabled. The load balancer - distributes new connections to all healthy backend endpoints - across all zones. - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal - Affinity is enabled. The load balancer distributes new - connections to all healthy backend endpoints in the local - zone only. If there are no healthy backend endpoints in the - local zone, the load balancer distributes new connections to - all backend endpoints in the local zone. - - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is enabled. - The load balancer distributes new connections to all healthy - backend endpoints in the local zone only. If there aren't - enough healthy backend endpoints in the local zone, the load - balancer distributes new connections to all healthy backend - endpoints across all zones. Check the Spillover enum for the - list of possible values. + not. The possible values are: + + :: + + - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity + is disabled. The load balancer distributes new connections to all + healthy backend endpoints across all zones. + - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there are no healthy + backend endpoints in the local zone, the load balancer distributes + new connections to all backend endpoints in the local zone. + - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there aren't enough + healthy backend endpoints in the local zone, the load balancer + distributes new connections to all healthy backend endpoints across all + zones. + + Check the Spillover enum for the list of possible values. This field is a member of `oneof`_ ``_spillover``. spillover_ratio (float): @@ -19680,19 +23002,24 @@ class BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity(proto.Message class Spillover(proto.Enum): r"""This field indicates whether zonal affinity is enabled or not. The - possible values are: - ZONAL_AFFINITY_DISABLED: Default Value. Zonal - Affinity is disabled. The load balancer distributes new connections - to all healthy backend endpoints across all zones. - - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is enabled. The load - balancer distributes new connections to all healthy backend - endpoints in the local zone only. If there are no healthy backend - endpoints in the local zone, the load balancer distributes new - connections to all backend endpoints in the local zone. - - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is enabled. The load - balancer distributes new connections to all healthy backend - endpoints in the local zone only. If there aren't enough healthy - backend endpoints in the local zone, the load balancer distributes - new connections to all healthy backend endpoints across all zones. + possible values are: + + :: + + - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity + is disabled. The load balancer distributes new connections to all + healthy backend endpoints across all zones. + - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there are no healthy + backend endpoints in the local zone, the load balancer distributes + new connections to all backend endpoints in the local zone. + - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there aren't enough + healthy backend endpoints in the local zone, the load balancer + distributes new connections to all healthy backend endpoints across all + zones. Values: UNDEFINED_SPILLOVER (0): @@ -19732,11 +23059,15 @@ class BackendServiceParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -19779,6 +23110,51 @@ class BackendServiceTlsSettings(proto.Message): if authenticationMode is not NONE. This field is a member of `oneof`_ ``_authentication_config``. + identity (str): + Assigns the Managed Identity for the BackendService + Workload. + + Use this property to configure the load balancer back-end to + use certificates and roots of trust provisioned by the + Managed Workload Identity system. + + The ``identity`` property is the fully-specified SPIFFE ID + to use in the SVID presented by the Load Balancer Workload. + + The SPIFFE ID must be a resource starting with the + ``trustDomain`` property value, followed by the path to the + Managed Workload Identity. + + Supported SPIFFE ID format: + + :: + + - ///ns//sa/ + + The Trust Domain within the Managed Identity must refer to a + valid Workload Identity Pool. The TrustConfig and + CertificateIssuanceConfig will be inherited from the + Workload Identity Pool. + + Restrictions: + + :: + + - If you set the `identity` property, you cannot manually set + the following fields: + - tlsSettings.sni + - tlsSettings.subjectAltNames + - tlsSettings.authenticationConfig + + When defining a ``identity`` for a RegionBackendServices, + the corresponding Workload Identity Pool must have a ca_pool + configured in the same region. + + The system will set up a + read-onlytlsSettings.authenticationConfig for the Managed + Identity. + + This field is a member of `oneof`_ ``_identity``. sni (str): Server Name Indication - see RFC3546 section 3.1. If set, the load balancer sends this string as the SNI hostname in @@ -19810,6 +23186,11 @@ class BackendServiceTlsSettings(proto.Message): number=408053481, optional=True, ) + identity: str = proto.Field( + proto.STRING, + number=401109182, + optional=True, + ) sni: str = proto.Field( proto.STRING, number=114030, @@ -19930,19 +23311,19 @@ class BfdPacket(proto.Message): Attributes: authentication_present (bool): The Authentication Present bit of the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_authentication_present``. control_plane_independent (bool): The Control Plane Independent bit of the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_control_plane_independent``. demand (bool): The demand bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + specified in section 4.1 ofRFC5880 This field is a member of `oneof`_ ``_demand``. diagnostic (str): @@ -19951,76 +23332,77 @@ class BfdPacket(proto.Message): state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in - section 4.1 of RFC5880 Check the Diagnostic enum - for the list of possible values. + section 4.1 ofRFC5880 + Check the Diagnostic enum for the list of + possible values. This field is a member of `oneof`_ ``_diagnostic``. final (bool): The Final bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + specified in section 4.1 ofRFC5880 This field is a member of `oneof`_ ``_final``. length (int): The length of the BFD Control packet in - bytes. This is specified in section 4.1 of - RFC5880 + bytes. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_length``. min_echo_rx_interval_ms (int): The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 - of RFC5880 + ofRFC5880 This field is a member of `oneof`_ ``_min_echo_rx_interval_ms``. min_rx_interval_ms (int): The Required Min RX Interval value in the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_min_rx_interval_ms``. min_tx_interval_ms (int): The Desired Min TX Interval value in the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_min_tx_interval_ms``. multiplier (int): The detection time multiplier of the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_multiplier``. multipoint (bool): The multipoint bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + specified in section 4.1 ofRFC5880 This field is a member of `oneof`_ ``_multipoint``. my_discriminator (int): The My Discriminator value in the BFD packet. - This is specified in section 4.1 of RFC5880 + This is specified in section 4.1 ofRFC5880 This field is a member of `oneof`_ ``_my_discriminator``. poll (bool): The Poll bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + specified in section 4.1 ofRFC5880 This field is a member of `oneof`_ ``_poll``. state (str): The current BFD session state as seen by the transmitting system. These states are specified - in section 4.1 of RFC5880 Check the State enum + in section 4.1 ofRFC5880 Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. version (int): The version number of the BFD protocol, as - specified in section 4.1 of RFC5880. + specified in section 4.1 ofRFC5880. This field is a member of `oneof`_ ``_version``. your_discriminator (int): The Your Discriminator value in the BFD - packet. This is specified in section 4.1 of - RFC5880 + packet. This is specified in section 4.1 + ofRFC5880 This field is a member of `oneof`_ ``_your_discriminator``. """ @@ -20029,8 +23411,8 @@ class Diagnostic(proto.Enum): r"""The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for - example. These diagnostic codes are specified in section 4.1 of - RFC5880 + example. These diagnostic codes are specified in section 4.1 + ofRFC5880 Values: UNDEFINED_DIAGNOSTIC (0): @@ -20071,7 +23453,7 @@ class Diagnostic(proto.Enum): class State(proto.Enum): r"""The current BFD session state as seen by the transmitting - system. These states are specified in section 4.1 of RFC5880 + system. These states are specified in section 4.1 ofRFC5880 Values: UNDEFINED_STATE (0): @@ -20190,9 +23572,9 @@ class BfdStatus(proto.Message): If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is - disabled for this BGP peer. Check the - BfdSessionInitializationMode enum for the list - of possible values. + disabled for this BGP peer. + Check the BfdSessionInitializationMode enum for + the list of possible values. This field is a member of `oneof`_ ``_bfd_session_initialization_mode``. config_update_timestamp_micros (int): @@ -20214,14 +23596,15 @@ class BfdStatus(proto.Message): state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in - section 4.1 of RFC5880 Check the LocalDiagnostic - enum for the list of possible values. + section 4.1 ofRFC5880 + Check the LocalDiagnostic enum for the list of + possible values. This field is a member of `oneof`_ ``_local_diagnostic``. local_state (str): The current BFD session state as seen by the transmitting system. These states are specified - in section 4.1 of RFC5880 Check the LocalState + in section 4.1 ofRFC5880 Check the LocalState enum for the list of possible values. This field is a member of `oneof`_ ``_local_state``. @@ -20248,11 +23631,11 @@ class BfdStatus(proto.Message): """ class BfdSessionInitializationMode(proto.Enum): - r"""The BFD session initialization mode for this BGP peer. If set - to ACTIVE, the Cloud Router will initiate the BFD session for - this BGP peer. If set to PASSIVE, the Cloud Router will wait for - the peer router to initiate the BFD session for this BGP peer. - If set to DISABLED, BFD is disabled for this BGP peer. + r"""The BFD session initialization mode for this BGP peer. + If set to ACTIVE, the Cloud Router will initiate the BFD session + for this BGP peer. If set to PASSIVE, the Cloud Router will wait + for the peer router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for this BGP peer. Values: UNDEFINED_BFD_SESSION_INITIALIZATION_MODE (0): @@ -20274,8 +23657,8 @@ class LocalDiagnostic(proto.Enum): r"""The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for - example. These diagnostic codes are specified in section 4.1 of - RFC5880 + example. These diagnostic codes are specified in section 4.1 + ofRFC5880 Values: UNDEFINED_LOCAL_DIAGNOSTIC (0): @@ -20316,7 +23699,7 @@ class LocalDiagnostic(proto.Enum): class LocalState(proto.Enum): r"""The current BFD session state as seen by the transmitting - system. These states are specified in section 4.1 of RFC5880 + system. These states are specified in section 4.1 ofRFC5880 Values: UNDEFINED_LOCAL_STATE (0): @@ -20611,12 +23994,16 @@ class Binding(proto.Message): This field is a member of `oneof`_ ``_binding_id``. condition (google.cloud.compute_v1beta.types.Expr): - The condition that is associated with this binding. If the - condition evaluates to ``true``, then this binding applies - to the current request. If the condition evaluates to - ``false``, then this binding does not apply to the current - request. However, a different role binding might grant the - same role to one or more of the principals in this binding. + The condition that is associated with this binding. + + If the condition evaluates to ``true``, then this binding + applies to the current request. + + If the condition evaluates to ``false``, then this binding + does not apply to the current request. However, a different + role binding might grant the same role to one or more of the + principals in this binding. + To learn which resources support conditions in their IAM policies, see the `IAM documentation `__. @@ -20625,73 +24012,98 @@ class Binding(proto.Message): members (MutableSequence[str]): Specifies the principals requesting access for a Google Cloud resource. ``members`` can have the following values: - \* ``allUsers``: A special identifier that represents anyone - who is on the internet; with or without a Google account. \* - ``allAuthenticatedUsers``: A special identifier that - represents anyone who is authenticated with a Google account - or a service account. Does not include identities that come - from external identity providers (IdPs) through identity - federation. \* ``user:{emailid}``: An email address that - represents a specific Google account. For example, - ``alice@example.com`` . \* ``serviceAccount:{emailid}``: An - email address that represents a Google service account. For - example, ``my-other-app@appspot.gserviceaccount.com``. \* - ``serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]``: - An identifier for a `Kubernetes service - account `__. - For example, - ``my-project.svc.id.goog[my-namespace/my-kubernetes-sa]``. - \* ``group:{emailid}``: An email address that represents a - Google group. For example, ``admins@example.com``. \* - ``domain:{domain}``: The G Suite domain (primary) that - represents all the users of that domain. For example, - ``google.com`` or ``example.com``. \* - ``principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: - A single identity in a workforce identity pool. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}``: - All workforce identities in a group. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: - All workforce identities with a specific attribute value. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*``: - All identities in a workforce identity pool. \* - ``principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}``: - A single identity in a workload identity pool. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}``: - A workload identity pool group. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: - All identities in a workload identity pool with a certain - attribute. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*``: - All identities in a workload identity pool. \* - ``deleted:user:{emailid}?uid={uniqueid}``: An email address - (plus unique identifier) representing a user that has been - recently deleted. For example, - ``alice@example.com?uid=123456789012345678901``. If the user - is recovered, this value reverts to ``user:{emailid}`` and - the recovered user retains the role in the binding. \* - ``deleted:serviceAccount:{emailid}?uid={uniqueid}``: An - email address (plus unique identifier) representing a - service account that has been recently deleted. For example, - ``my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901``. - If the service account is undeleted, this value reverts to - ``serviceAccount:{emailid}`` and the undeleted service - account retains the role in the binding. \* - ``deleted:group:{emailid}?uid={uniqueid}``: An email address - (plus unique identifier) representing a Google group that - has been recently deleted. For example, - ``admins@example.com?uid=123456789012345678901``. If the - group is recovered, this value reverts to - ``group:{emailid}`` and the recovered group retains the role - in the binding. \* - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: - Deleted single identity in a workforce identity pool. For - example, - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value``. + + - ``allUsers``: A special identifier that represents anyone + who is on the internet; with or without a Google account. + + - ``allAuthenticatedUsers``: A special identifier that + represents anyone who is authenticated with a Google + account or a service account. Does not include identities + that come from external identity providers (IdPs) through + identity federation. + + - ``user:{emailid}``: An email address that represents a + specific Google account. For example, + ``alice@example.com`` . + + - ``serviceAccount:{emailid}``: An email address that + represents a Google service account. For example, + ``my-other-app@appspot.gserviceaccount.com``. + + - ``serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]``: + An identifier for a `Kubernetes service + account `__. + For example, + ``my-project.svc.id.goog[my-namespace/my-kubernetes-sa]``. + + - ``group:{emailid}``: An email address that represents a + Google group. For example, ``admins@example.com``. + + - ``domain:{domain}``: The G Suite domain (primary) that + represents all the users of that domain. For example, + ``google.com`` or ``example.com``. + + - ``principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: + A single identity in a workforce identity pool. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}``: + All workforce identities in a group. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: + All workforce identities with a specific attribute value. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*``: + All identities in a workforce identity pool. + + - ``principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}``: + A single identity in a workload identity pool. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}``: + A workload identity pool group. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: + All identities in a workload identity pool with a certain + attribute. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*``: + All identities in a workload identity pool. + + - ``deleted:user:{emailid}?uid={uniqueid}``: An email + address (plus unique identifier) representing a user that + has been recently deleted. For example, + ``alice@example.com?uid=123456789012345678901``. If the + user is recovered, this value reverts to + ``user:{emailid}`` and the recovered user retains the role + in the binding. + + - ``deleted:serviceAccount:{emailid}?uid={uniqueid}``: An + email address (plus unique identifier) representing a + service account that has been recently deleted. For + example, + ``my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901``. + If the service account is undeleted, this value reverts to + ``serviceAccount:{emailid}`` and the undeleted service + account retains the role in the binding. + + - ``deleted:group:{emailid}?uid={uniqueid}``: An email + address (plus unique identifier) representing a Google + group that has been recently deleted. For example, + ``admins@example.com?uid=123456789012345678901``. If the + group is recovered, this value reverts to + ``group:{emailid}`` and the recovered group retains the + role in the binding. + + - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: + Deleted single identity in a workforce identity pool. For + example, + ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value``. role (str): Role that is assigned to the list of ``members``, or principals. For example, ``roles/viewer``, ``roles/editor``, - or ``roles/owner``. For an overview of the IAM roles and - permissions, see the `IAM + or ``roles/owner``. + + For an overview of the IAM roles and permissions, see the + `IAM documentation `__. For a list of the available pre-defined roles, see `here `__. @@ -20738,17 +24150,21 @@ class BulkInsertDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -20787,11 +24203,17 @@ class BulkInsertDiskResource(proto.Message): source_consistency_group_policy (str): The URL of the DiskConsistencyGroupPolicy for the group of disks to clone. This may be a full - or partial URL, such as: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - + or partial URL, such as: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + + - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + + - + regions/region/resourcePolicies/resourcePolicy This field is a member of `oneof`_ ``_source_consistency_group_policy``. """ @@ -20820,17 +24242,21 @@ class BulkInsertInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -20878,13 +24304,13 @@ class BulkInsertInstanceResource(proto.Message): This field is a member of `oneof`_ ``_instance_properties``. location_policy (google.cloud.compute_v1beta.types.LocationPolicy): Policy for choosing target zone. For more - information, see Create VMs in bulk. + information, seeCreate VMs in bulk. This field is a member of `oneof`_ ``_location_policy``. min_count (int): The minimum number of instances to create. If no min_count - is specified then count is used as the default value. If - min_count instances cannot be created, then no instances + is specified then count is used as the default value. + Ifmin_count instances cannot be created, then no instances will be created and instances already created will be deleted. @@ -20895,13 +24321,13 @@ class BulkInsertInstanceResource(proto.Message): pattern must contain one continuous sequence of placeholder hash characters (#) with each character corresponding to one digit of the generated instance name. Example: a - name_pattern of inst-#### generates instance names such as - inst-0001 and inst-0002. If existing instances in the same + name_pattern of inst-#### generates instance names such + asinst-0001 and inst-0002. If existing instances in the same project and zone have names that match the name pattern then the generated instance numbers start after the biggest existing number. For example, if there exists an instance - with name inst-0050, then instance names generated using the - pattern inst-#### begin with inst-0051. The name pattern + with nameinst-0050, then instance names generated using the + patterninst-#### begin with inst-0051. The name pattern placeholder #...# can contain up to 18 characters. This field is a member of `oneof`_ ``_name_pattern``. @@ -20912,18 +24338,25 @@ class BulkInsertInstanceResource(proto.Message): source_instance_template (str): Specifies the instance template from which to create instances. You may combine - sourceInstanceTemplate with instanceProperties - to override specific values from an existing + sourceInstanceTemplate withinstanceProperties to + override specific values from an existing instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC - 7396. It can be a full or partial URL. For - example, the following are all valid URLs to an - instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate This - field is optional. + 7396. + + It can be a full or partial URL. For example, + the following are all valid URLs to an instance + template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate + + This field is optional. This field is a member of `oneof`_ ``_source_instance_template``. """ @@ -20971,8 +24404,8 @@ class BulkInsertInstanceResource(proto.Message): class BulkInsertInstanceResourcePerInstanceProperties(proto.Message): - r"""Per-instance properties to be set on individual instances. To - be extended in the future. + r"""Per-instance properties to be set on individual instances. + To be extended in the future. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -21102,17 +24535,21 @@ class BulkInsertRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -21156,17 +24593,21 @@ class BulkInsertRegionInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -21208,17 +24649,21 @@ class BulkSetLabelsDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -21338,15 +24783,19 @@ class CacheInvalidationRule(proto.Message): Attributes: cache_tags (MutableSequence[str]): - A list of cache tags used to identify cached objects. - - Cache tags are specified when the response is first cached, - by setting the ``Cache-Tag`` response header at the origin. - - Multiple cache tags in the same invalidation request are - treated as Boolean ``OR`` - for example, - ``tag1 OR tag2 OR tag3``. - If other fields are also - specified, these are treated as Boolean ``AND`` with any - tags. Up to 10 tags can be specified in a single - invalidation request. + A list of cache tags used to identify cached objects. + + :: + + - Cache tags are specified when the response is first cached, by setting + the `Cache-Tag` response header at the origin. + - Multiple cache tags in the same invalidation request are treated as + Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. + - If other fields are also specified, these are treated as Boolean `AND` + with any tags. + + Up to 10 tags can be specified in a single invalidation + request. host (str): If set, this invalidation rule will only apply to requests with a Host header matching @@ -21567,17 +25016,21 @@ class CancelFutureReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -21614,9 +25067,9 @@ class CancelInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035 or be a resource - ID. + The name of the managed instance group. + The name should conform to RFC1035 or be a + resource ID. project (str): Project ID for this request. request_id (str): @@ -21624,25 +25077,29 @@ class CancelInstanceGroupManagerResizeRequestRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resize_request (str): - The name of the resize request to cancel. The - name should conform to RFC1035 or be a resource - ID. + The name of the resize request to cancel. + The name should conform to RFC1035 or be a + resource ID. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. The name should conform to RFC1035. """ @@ -21680,29 +25137,35 @@ class CancelRegionInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. region (str): - The name of the region scoping this request. - Name should conform to RFC1035. + The name of the region + scoping this request. Name should conform to + RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resize_request (str): @@ -21750,7 +25213,9 @@ class CircuitBreakers(proto.Message): max_connections (int): The maximum number of connections to the backend service. If not specified, there is no - limit. Not supported when the backend service is + limit. + + Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. @@ -21759,10 +25224,12 @@ class CircuitBreakers(proto.Message): max_pending_requests (int): The maximum number of pending requests allowed to the backend service. If not - specified, there is no limit. Not supported when - the backend service is referenced by a URL map - that is bound to target gRPC proxy that has - validateForProxyless field set to true. + specified, there is no limit. + + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. This field is a member of `oneof`_ ``_max_pending_requests``. max_requests (int): @@ -21777,19 +25244,23 @@ class CircuitBreakers(proto.Message): by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable - keep alive. Not supported when the backend - service is referenced by a URL map that is bound - to target gRPC proxy that has - validateForProxyless field set to true. + keep alive. + + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. This field is a member of `oneof`_ ``_max_requests_per_connection``. max_retries (int): The maximum number of parallel retries allowed to the backend cluster. If not - specified, the default is 1. Not supported when - the backend service is referenced by a URL map - that is bound to target gRPC proxy that has - validateForProxyless field set to true. + specified, the default is 1. + + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. This field is a member of `oneof`_ ``_max_retries``. """ @@ -21842,17 +25313,21 @@ class CloneRulesFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_firewall_policy (str): @@ -21894,17 +25369,21 @@ class CloneRulesNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_firewall_policy (str): @@ -21953,17 +25432,21 @@ class CloneRulesRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_firewall_policy (str): @@ -21998,6 +25481,7 @@ class CloneRulesRegionNetworkFirewallPolicyRequest(proto.Message): class Commitment(proto.Message): r"""Represents a regional resource-based commitment resource. + Creating this commitment resource means that you are purchasing a resource-based committed use contract, with an explicit start and end time. You can purchase resource-based commitments for @@ -22027,24 +25511,24 @@ class Commitment(proto.Message): whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine - resources such as VCPU or MEMORY, listed in + resources such asVCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, listed in - licenseResources. Note that if you specify - MACHINE commitments, then you must also specify - a type to indicate the machine series of the - hardware resource that you are committing to. - Check the Category enum for the list of possible - values. + licenseResources. + Note that if you specify MACHINE commitments, + then you must also specify a type to indicate + the machine series of the hardware resource that + you are committing to. Check the Category enum + for the list of possible values. This field is a member of `oneof`_ ``_category``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. custom_end_timestamp (str): [Input Only] Optional, specifies the requested commitment - end time in RFC3339 text format. Use this option when the + end time inRFC3339 text format. Use this option when the desired commitment's end date is later than the start date + term duration. @@ -22056,7 +25540,7 @@ class Commitment(proto.Message): This field is a member of `oneof`_ ``_description``. end_timestamp (str): - [Output Only] Commitment end time in RFC3339 text format. + [Output Only] Commitment end time inRFC3339 text format. This field is a member of `oneof`_ ``_end_timestamp``. existing_reservations (MutableSequence[str]): @@ -22083,8 +25567,8 @@ class Commitment(proto.Message): name (str): Name of the commitment. You must specify a name when you purchase the commitment. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, @@ -22098,9 +25582,8 @@ class Commitment(proto.Message): and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for - this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH - (3 years). Check the Plan enum for the list of possible - values. + this field are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 + years). Check the Plan enum for the list of possible values. This field is a member of `oneof`_ ``_plan``. region (str): @@ -22110,14 +25593,16 @@ class Commitment(proto.Message): This field is a member of `oneof`_ ``_region``. reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): The list of new reservations that you want to - create and attach to this commitment. You must - attach reservations to your commitment if your - commitment specifies any GPUs or Local SSD - disks. For more information, see Attach + create and attach to this commitment. + + You must attach reservations to your commitment + if your commitment specifies any GPUs or Local + SSD disks. For more information, see Attach reservations to resource-based commitments. + Specify this property only if you want to create new reservations to attach. To attach existing - reservations, specify the existingReservations + reservations, specify theexistingReservations property instead. resource_status (google.cloud.compute_v1beta.types.CommitmentResourceStatus): [Output Only] Status information for Commitment resource. @@ -22140,15 +25625,15 @@ class Commitment(proto.Message): This field is a member of `oneof`_ ``_split_source_commitment``. start_timestamp (str): - [Output Only] Commitment start time in RFC3339 text format. + [Output Only] Commitment start time inRFC3339 text format. This field is a member of `oneof`_ ``_start_timestamp``. status (str): [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be one of the following values: - NOT_YET_ACTIVE, ACTIVE, or EXPIRED. Check the Status enum - for the list of possible values. + NOT_YET_ACTIVE, ACTIVE, orEXPIRED. Check the Status enum for + the list of possible values. This field is a member of `oneof`_ ``_status``. status_message (str): @@ -22160,21 +25645,24 @@ class Commitment(proto.Message): The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series affects the discount rate and the eligible - resource types. The type must be one of the following: - ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3, - ACCELERATOR_OPTIMIZED_A3_MEGA, COMPUTE_OPTIMIZED, + resource types. + + The type must be one of the following:ACCELERATOR_OPTIMIZED, + ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, - COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, - GENERAL_PURPOSE, GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, - GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, - GENERAL_PURPOSE_T2D, GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, - MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4, - STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED - specifies a commitment that applies only to eligible - resources of memory optimized M1 and M2 machine series. Type - GENERAL_PURPOSE specifies a commitment that applies only to - eligible resources of general purpose N1 machine series. - Check the Type enum for the list of possible values. + COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, + GENERAL_PURPOSE,GENERAL_PURPOSE_C4, + GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, + GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, + GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, + MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, + MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3. For example, type + MEMORY_OPTIMIZED specifies a commitment that applies only to + eligible resources of memory optimized M1 and M2 machine + series. Type GENERAL_PURPOSE specifies a commitment that + applies only to eligible resources of general purpose N1 + machine series. Check the Type enum for the list of possible + values. This field is a member of `oneof`_ ``_type``. """ @@ -22183,12 +25671,12 @@ class Category(proto.Enum): r"""The category of the commitment; specifies whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine - resources such as VCPU or MEMORY, listed in resources. Category + resources such asVCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, - listed in licenseResources. Note that if you specify MACHINE - commitments, then you must also specify a type to indicate the - machine series of the hardware resource that you are committing - to. + listed in licenseResources. + Note that if you specify MACHINE commitments, then you must also + specify a type to indicate the machine series of the hardware + resource that you are committing to. Values: UNDEFINED_CATEGORY (0): @@ -22212,8 +25700,8 @@ class Plan(proto.Enum): commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The - supported values for this field are TWELVE_MONTH (1 year), and - THIRTY_SIX_MONTH (3 years). + supported values for this field are TWELVE_MONTH (1 year), + andTHIRTY_SIX_MONTH (3 years). Values: UNDEFINED_PLAN (0): @@ -22234,7 +25722,7 @@ class Plan(proto.Enum): class Status(proto.Enum): r"""[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be - one of the following values: NOT_YET_ACTIVE, ACTIVE, or EXPIRED. + one of the following values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED. Values: UNDEFINED_STATUS (0): @@ -22263,15 +25751,18 @@ class Status(proto.Enum): class Type(proto.Enum): r"""The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series - affects the discount rate and the eligible resource types. The type - must be one of the following: ACCELERATOR_OPTIMIZED, - ACCELERATOR_OPTIMIZED_A3, ACCELERATOR_OPTIMIZED_A3_MEGA, - COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, - COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE, - GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_N2, - GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D, - GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3, - MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type + affects the discount rate and the eligible resource types. + + The type must be one of the following:ACCELERATOR_OPTIMIZED, + ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, + COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, + COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, + GENERAL_PURPOSE,GENERAL_PURPOSE_C4, + GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, + GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, + GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, + MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, + MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED specifies a commitment that applies only to eligible resources of memory optimized M1 and M2 machine series. Type GENERAL_PURPOSE specifies a commitment that applies only to @@ -22508,15 +25999,15 @@ class CommitmentAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.CommitmentsScopedList]): A list of CommitmentsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#commitmentAggregatedList for aggregated lists of - commitments. + [Output Only] Type of resource. + Alwayscompute#commitmentAggregatedList for aggregated lists + of commitments. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -22597,7 +26088,7 @@ class CommitmentList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -22650,48 +26141,383 @@ def raw_page(self): ) -class CommitmentResourceStatus(proto.Message): - r"""[Output Only] Contains output only fields. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - custom_term_eligibility_end_timestamp (str): - [Output Only] Indicates the end time of customer's - eligibility to send custom term requests in RFC3339 text - format. Term extension requests that (not the end time in - the request) after this time will be rejected. - - This field is a member of `oneof`_ ``_custom_term_eligibility_end_timestamp``. - """ - - custom_term_eligibility_end_timestamp: str = proto.Field( - proto.STRING, - number=363976187, - optional=True, - ) - - -class CommitmentsScopedList(proto.Message): +class CommitmentResourceStatus(proto.Message): + r"""[Output Only] Contains output only fields. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + custom_term_eligibility_end_timestamp (str): + [Output Only] Indicates the end time of customer's + eligibility to send custom term requests in RFC3339 text + format. Term extension requests that (not the end time in + the request) after this time will be rejected. + + This field is a member of `oneof`_ ``_custom_term_eligibility_end_timestamp``. + """ + + custom_term_eligibility_end_timestamp: str = proto.Field( + proto.STRING, + number=363976187, + optional=True, + ) + + +class CommitmentsScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + commitments (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): + [Output Only] The list of commitments contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of commitments when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + commitments: MutableSequence["Commitment"] = proto.RepeatedField( + proto.MESSAGE, + number=450664446, + message="Commitment", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class CompositeHealthCheck(proto.Message): + r"""Represents a composite health check. + + A composite health check resource specifies the health source + resources and the health destination resource to which the + aggregated health result from the health source resources is + delivered. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a CompositeHealthCheck. + An up-to-date fingerprint must be provided in + order to patch the CompositeHealthCheck; + Otherwise, the request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + CompositeHealthCheck. + + This field is a member of `oneof`_ ``_fingerprint``. + health_destination (str): + URL to the destination resource. Must be set. Must be + aForwardingRule. The ForwardingRule must have load balancing + scheme INTERNAL orINTERNAL_MANAGED and must be regional and + in the same region as the CompositeHealthCheck (cross-region + deployment forINTERNAL_MANAGED is not supported). Can be + mutated. + + This field is a member of `oneof`_ ``_health_destination``. + health_sources (MutableSequence[str]): + URLs to the HealthSource resources whose + results are AND'ed. I.e. he aggregated result is + is HEALTHY only if all sources are HEALTHY. Must + have at least 1. Must not have more than 10. + Must be regional and in the same region as + theCompositeHealthCheck. Can be mutated. + id (int): + [Output Only] A unique identifier for this resource type. + The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#compositeHealthCheck for composite health + checks. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + region (str): + [Output Only] URL of the region where the composite health + check resides. This field applies only to the regional + resource. You must specify this field as part of the HTTP + request URL. It is not settable as a field in the request + body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL with id for the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. + """ + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + health_destination: str = proto.Field( + proto.STRING, + number=311098027, + optional=True, + ) + health_sources: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=397879509, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + + +class CompositeHealthCheckAggregatedList(proto.Message): + r"""Contains a list of CompositeHealthChecksScopedList. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.CompositeHealthChecksScopedList]): + A list of CompositeHealthChecksScopedList + resources. + kind (str): + Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "CompositeHealthChecksScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="CompositeHealthChecksScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class CompositeHealthCheckList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.CompositeHealthCheck]): + A list of CompositeHealthCheck resources. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#compositeHealthCheck for composite health + checks. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["CompositeHealthCheck"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="CompositeHealthCheck", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class CompositeHealthChecksScopedList(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - commitments (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): - [Output Only] The list of commitments contained in this - scope. + composite_health_checks (MutableSequence[google.cloud.compute_v1beta.types.CompositeHealthCheck]): + A list of CompositeHealthChecks contained in + this scope. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of commitments when the list is empty. + Informational warning which replaces the list + of composite health checks when the list is + empty. This field is a member of `oneof`_ ``_warning``. """ - commitments: MutableSequence["Commitment"] = proto.RepeatedField( + composite_health_checks: MutableSequence[ + "CompositeHealthCheck" + ] = proto.RepeatedField( proto.MESSAGE, - number=450664446, - message="Commitment", + number=517891062, + message="CompositeHealthCheck", ) warning: "Warning" = proto.Field( proto.MESSAGE, @@ -22767,7 +26593,7 @@ class ConnectionDraining(proto.Message): Configures a duration timeout for existing requests on a removed backend instance. For supported load balancers and protocols, as - described in Enabling connection draining. + described inEnabling connection draining. This field is a member of `oneof`_ ``_draining_timeout_sec``. """ @@ -22792,25 +26618,27 @@ class ConsistentHashLoadBalancerSettings(proto.Message): cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity - is set to HTTP_COOKIE. Not supported when the backend - service is referenced by a URL map that is bound to target - gRPC proxy that has validateForProxyless field set to true. + is set to HTTP_COOKIE. + + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. This field is a member of `oneof`_ ``_http_cookie``. http_header_name (str): The hash based on the value of the specified header field. - This field is applicable if the sessionAffinity is set to - HEADER_FIELD. + This field is applicable if the sessionAffinity is set + toHEADER_FIELD. This field is a member of `oneof`_ ``_http_header_name``. minimum_ring_size (int): The minimum number of virtual nodes to use - for the hash ring. Defaults to 1024. Larger ring - sizes result in more granular load - distributions. If the number of hosts in the - load balancing pool is larger than the ring - size, each host will be assigned a single - virtual node. + for the hash ring. Defaults to + 1024. Larger ring sizes result in more granular + load distributions. If the number of hosts + in the load balancing pool is larger than + the ring size, each host will be assigned a + single virtual node. This field is a member of `oneof`_ ``_minimum_ring_size``. """ @@ -22887,17 +26715,21 @@ class CopyRulesOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -22936,11 +26768,12 @@ class CorsPolicy(proto.Message): Attributes: allow_credentials (bool): In response to a preflight request, setting - this to true indicates that the actual request - can include user credentials. This field - translates to the - Access-Control-Allow-Credentials header. Default - is false. + this to true indicates that + the actual request can include user credentials. + This field translates to the + Access-Control-Allow-Credentials header. + + Default is false. This field is a member of `oneof`_ ``_allow_credentials``. allow_headers (MutableSequence[str]): @@ -22951,20 +26784,23 @@ class CorsPolicy(proto.Message): Access-Control-Allow-Methods header. allow_origin_regexes (MutableSequence[str]): Specifies a regular expression that matches allowed origins. - For more information, see regular expression syntax . An - origin is allowed if it matches either an item in - allowOrigins or an item in allowOriginRegexes. Regular - expressions can only be used when the loadBalancingScheme is - set to INTERNAL_SELF_MANAGED. + For more information, see regular expression syntax. + + An origin is allowed if it matches either an item + inallowOrigins or an item inallowOriginRegexes. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED. allow_origins (MutableSequence[str]): Specifies the list of origins that is allowed - to do CORS requests. An origin is allowed if it - matches either an item in allowOrigins or an - item in allowOriginRegexes. + to do CORS requests. + An origin is allowed if it matches either an + item inallowOrigins or an item + inallowOriginRegexes. disabled (bool): - If true, disables the CORS policy. The - default value is false, which indicates that the - CORS policy is in effect. + If true, disables the CORS policy. + The default value is false, which indicates that + the CORS policy is in effect. This field is a member of `oneof`_ ``_disabled``. expose_headers (MutableSequence[str]): @@ -23024,8 +26860,8 @@ class CreateInstancesInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersCreateInstancesRequest): The body resource for this request project (str): @@ -23035,22 +26871,25 @@ class CreateInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. The request ID must be a valid UUID - with the exception that zero UUID is not - supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -23087,14 +26926,14 @@ class CreateInstancesRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. region (str): - The name of the region where the managed - instance group is located. It should conform to - RFC1035. + The name of theregion + where the managed instance group is located. + It should conform to RFC1035. region_instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest): The body resource for this request request_id (str): @@ -23102,16 +26941,19 @@ class CreateInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. The request ID must be a valid UUID - with the exception that zero UUID is not - supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -23192,17 +27034,21 @@ class CreateSnapshotDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): @@ -23260,17 +27106,21 @@ class CreateSnapshotRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): @@ -23302,16 +27152,17 @@ class CreateSnapshotRegionDiskRequest(proto.Message): class CrossSiteNetwork(proto.Message): - r"""A resource that represents a cross-site network. You can use - cross-site networks to connect your on-premises networks to each - other through Interconnect connections. + r"""A resource that represents a cross-site network. + + You can use cross-site networks to connect your on-premises + networks to each other through Interconnect connections. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -23325,14 +27176,14 @@ class CrossSiteNetwork(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#crossSiteNetwork for cross-site networks. + [Output Only] Type of the resource. + Alwayscompute#crossSiteNetwork for cross-site networks. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -23397,14 +27248,14 @@ class CrossSiteNetworkList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.CrossSiteNetwork]): A list of CrossSiteNetwork resources. kind (str): - [Output Only] Type of the resource. Always - compute#crossSiteNetwork for cross-site networks. + [Output Only] Type of the resource. + Alwayscompute#crossSiteNetwork for cross-site networks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -23480,33 +27331,39 @@ class CustomErrorResponsePolicy(proto.Message): Attributes: error_response_rules (MutableSequence[google.cloud.compute_v1beta.types.CustomErrorResponsePolicyCustomErrorResponseRule]): Specifies rules for returning error - responses. In a given policy, if you specify - rules for both a range of error codes as well as - rules for specific error codes then rules with - specific error codes have a higher priority. For - example, assume that you configure a rule for - 401 (Un-authorized) code, and another for all 4 + responses. + In a given policy, if you specify rules for both + a range of error codes as well as rules for + specific error codes then rules with specific + error codes have a higher priority. For example, + assume that you configure a rule for 401 + (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service - returns a 401, then the rule for 401 will be + returns a401, then the rule for 401 will be applied. However if the backend service returns - a 403, the rule for 4xx takes effect. + a 403, the rule for4xx takes effect. error_service (str): The full or partial URL to the BackendBucket resource that - contains the custom error content. Examples are: - - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - - - compute/v1/projects/project/global/backendBuckets/myBackendBucket - - global/backendBuckets/myBackendBucket If errorService is - not specified at lower levels like pathMatcher, pathRule and - routeRule, an errorService specified at a higher level in - the UrlMap will be used. If - UrlMap.defaultCustomErrorResponsePolicy contains one or more - errorResponseRules[], it must specify errorService. If load - balancer cannot reach the backendBucket, a simple Not Found - Error will be returned, with the original response code (or - overrideResponseCode if configured). errorService is not - supported for internal or regional HTTP/HTTPS load - balancers. + contains the custom error content. Examples are: + + :: + + - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket + - compute/v1/projects/project/global/backendBuckets/myBackendBucket + - global/backendBuckets/myBackendBucket + + If errorService is not specified at lower levels + likepathMatcher, pathRule and routeRule, an errorService + specified at a higher level in theUrlMap will be used. + IfUrlMap.defaultCustomErrorResponsePolicy contains one or + moreerrorResponseRules[], it must specifyerrorService. + + If load balancer cannot reach the backendBucket, a simple + Not Found Error will be returned, with the original response + code (oroverrideResponseCode if configured). + + errorService is not supported for internal or + regionalHTTP/HTTPS load balancers. This field is a member of `oneof`_ ``_error_service``. """ @@ -23535,18 +27392,25 @@ class CustomErrorResponsePolicyCustomErrorResponseRule(proto.Message): Attributes: match_response_codes (MutableSequence[str]): - Valid values include: - A number between 400 - and 599: For example 401 or 503, in which case - the load balancer applies the policy if the - error code exactly matches this value. - 5xx: - Load Balancer will apply the policy if the - backend service responds with any response code - in the range of 500 to 599. - 4xx: Load Balancer - will apply the policy if the backend service - responds with any response code in the range of - 400 to 499. Values must be unique within - matchResponseCodes and across all - errorResponseRules of CustomErrorResponsePolicy. + Valid values include: + + + - A number between 400 and 599: For example + 401 or 503, in which case the load balancer + applies the policy if the error code exactly + matches this value. + - 5xx: Load Balancer will apply the policy + if the backend service responds with any + response code in the range of 500 to 599. + - 4xx: Load + Balancer will apply the policy if the + backend service responds with any response + code in the range of 400 to + 499. + + Values must be unique within matchResponseCodes + and across allerrorResponseRules + ofCustomErrorResponsePolicy. override_response_code (int): The HTTP status code returned with the response containing the custom error content. If @@ -23558,13 +27422,18 @@ class CustomErrorResponsePolicyCustomErrorResponseRule(proto.Message): This field is a member of `oneof`_ ``_override_response_code``. path (str): The full path to a file within backendBucket - . For example: /errors/defaultError.html path - must start with a leading slash. path cannot - have trailing slashes. If the file is not - available in backendBucket or the load balancer - cannot reach the BackendBucket, a simple Not - Found Error is returned to the client. The value - must be from 1 to 1024 characters + . For example:/errors/defaultError.html + path must start + with a leading slash. path cannot have trailing + slashes. + + If the file is not available in backendBucket + or the load balancer cannot reach the + BackendBucket, a simpleNot Found Error is + returned to the client. + + The value must + be from 1 to 1024 characters This field is a member of `oneof`_ ``_path``. """ @@ -23593,10 +27462,15 @@ class CustomerEncryptionKey(proto.Message): Attributes: kms_key_name (str): The name of the encryption key that is stored in Google - Cloud KMS. For example: "kmsKeyName": + Cloud KMS. For example: + + "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ - key_region/cryptoKeys/key The fully-qualifed key name may be - returned for resource GET requests. For example: + key_region/cryptoKeys/key + + The fully-qualifed key name may be returned for resource GET + requests. For example: + "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 @@ -23606,16 +27480,20 @@ class CustomerEncryptionKey(proto.Message): The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: + "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ This field is a member of `oneof`_ ``_kms_key_service_account``. raw_key (str): Specifies a 256-bit customer-supplied - encryption key, encoded in RFC 4648 base64 to - either encrypt or decrypt this resource. You can - provide either the rawKey or the - rsaEncryptedKey. For example: "rawKey": + encryption key, encoded in RFC + 4648 base64 to either encrypt or decrypt this + resource. You can provide either the rawKey or + thersaEncryptedKey. For example: + + "rawKey": + "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=". This field is a member of `oneof`_ ``_raw_key``. @@ -23624,24 +27502,31 @@ class CustomerEncryptionKey(proto.Message): RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or - the rsaEncryptedKey. For example: + thersaEncryptedKey. For example: + "rsaEncryptedKey": + "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" + The key must meet the following requirements - before you can provide it to Compute Engine: 1. - The key is wrapped using a RSA public key - certificate provided by Google. 2. After being - wrapped, the key must be encoded in RFC 4648 - base64 encoding. Gets the RSA public key - certificate provided by Google at: + before you can provide it to Compute Engine: + + 1. The key is wrapped using a RSA public key + certificate provided by Google. + 2. After being wrapped, the key must be + encoded in RFC 4648 base64 encoding. + + Gets the RSA public key certificate provided by + Google at: + https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem This field is a member of `oneof`_ ``_rsa_encrypted_key``. sha256 (str): - [Output only] The RFC 4648 base64 encoded SHA-256 hash of - the customer-supplied encryption key that protects this + [Output only] TheRFC 4648 base64 encoded SHA-256 hash of the + customer-supplied encryption key that protects this resource. This field is a member of `oneof`_ ``_sha256``. @@ -23681,15 +27566,17 @@ class CustomerEncryptionKeyProtectedDisk(proto.Message): Attributes: disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Decrypts data associated with the disk with a - customer-supplied encryption key. + Decrypts data associated with the disk with + acustomer-supplied encryption key. This field is a member of `oneof`_ ``_disk_encryption_key``. source (str): Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for - persistent disks. For example: "source": - "/compute/v1/projects/project_id/zones/zone/disks/ disk_name + persistent disks. For example: + + "source": "/compute/v1/projects/project_id/zones/zone/disks/ + disk_name This field is a member of `oneof`_ ``_source``. """ @@ -23747,13 +27634,19 @@ class Date(proto.Message): r"""Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This - can represent one of the following: \* A full date, with non-zero - year, month, and day values. \* A month and day, with a zero year - (for example, an anniversary). \* A year on its own, with a zero - month and a zero day. \* A year and month, with a zero day (for - example, a credit card expiration date). Related types: \* - google.type.TimeOfDay \* google.type.DateTime \* - google.protobuf.Timestamp + can represent one of the following: + + - A full date, with non-zero year, month, and day values. + - A month and day, with a zero year (for example, an anniversary). + - A year on its own, with a zero month and a zero day. + - A year and month, with a zero day (for example, a credit card + expiration date). + + Related types: + + - google.type.TimeOfDay + - google.type.DateTime + - google.protobuf.Timestamp .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -23816,17 +27709,21 @@ class DeleteAccessConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -23879,17 +27776,21 @@ class DeleteAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -23930,17 +27831,21 @@ class DeleteAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -23983,17 +27888,21 @@ class DeleteBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24031,17 +27940,21 @@ class DeleteBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24077,15 +27990,18 @@ class DeleteCrossSiteNetworkRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -24123,17 +28039,21 @@ class DeleteDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -24176,17 +28096,21 @@ class DeleteExternalVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24221,17 +28145,21 @@ class DeleteFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24264,17 +28192,21 @@ class DeleteFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24314,17 +28246,21 @@ class DeleteForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24366,17 +28302,21 @@ class DeleteFutureReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -24420,17 +28360,21 @@ class DeleteGlobalAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24468,17 +28412,21 @@ class DeleteGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24516,17 +28464,21 @@ class DeleteGlobalNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24628,17 +28580,21 @@ class DeleteGlobalPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24675,17 +28631,21 @@ class DeleteHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24722,17 +28682,21 @@ class DeleteImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -24770,21 +28734,25 @@ class DeleteInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -24817,9 +28785,9 @@ class DeleteInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035 or be a resource - ID. + The name of the managed instance group. + The name should conform to RFC1035 or be a + resource ID. project (str): Project ID for this request. request_id (str): @@ -24827,25 +28795,29 @@ class DeleteInstanceGroupManagerResizeRequestRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resize_request (str): - The name of the resize request to delete. The - name should conform to RFC1035 or be a resource - ID. + The name of the resize request to delete. + The name should conform to RFC1035 or be a + resource ID. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. The name should conform to RFC1035. """ @@ -24890,22 +28862,26 @@ class DeleteInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -24948,17 +28924,21 @@ class DeleteInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -25006,17 +28986,21 @@ class DeleteInstanceTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25055,21 +29039,25 @@ class DeleteInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -25119,17 +29107,21 @@ class DeleteInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25176,17 +29168,21 @@ class DeleteInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -25229,15 +29225,18 @@ class DeleteInterconnectAttachmentGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -25278,17 +29277,21 @@ class DeleteInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25329,15 +29332,18 @@ class DeleteInterconnectGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -25375,17 +29381,21 @@ class DeleteInterconnectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25422,17 +29432,21 @@ class DeleteLicenseRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25469,17 +29483,21 @@ class DeleteMachineImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25518,15 +29536,18 @@ class DeleteNetworkAttachmentRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -25571,17 +29592,21 @@ class DeleteNetworkEdgeSecurityServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25623,23 +29648,27 @@ class DeleteNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ network_endpoint_group: str = proto.Field( @@ -25678,17 +29707,21 @@ class DeleteNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25730,17 +29763,21 @@ class DeleteNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -25787,17 +29824,21 @@ class DeleteNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25834,17 +29875,21 @@ class DeleteNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -25889,17 +29934,21 @@ class DeleteNodeTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -25943,17 +29992,21 @@ class DeleteNodesNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -25999,17 +30052,21 @@ class DeleteOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -26047,17 +30104,21 @@ class DeletePacketMirroringRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26088,16 +30149,17 @@ class DeletePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_delete_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersDeletePerInstanceConfigsReq): The body resource for this request project (str): Project ID for this request. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -26174,17 +30236,21 @@ class DeletePublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26224,17 +30290,21 @@ class DeletePublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26277,17 +30347,21 @@ class DeleteRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26311,6 +30385,72 @@ class DeleteRegionAutoscalerRequest(proto.Message): ) +class DeleteRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Delete. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to delete. + force_delete (bool): + Force delete the backend bucket even if it is + still in use by other resources. It's intended + to be used internally only for requests from + wipeout. + + This field is a member of `oneof`_ ``_force_delete``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder + + This field is a member of `oneof`_ ``_request_id``. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + force_delete: bool = proto.Field( + proto.BOOL, + number=214559103, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class DeleteRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.Delete. See the method description for details. @@ -26331,17 +30471,21 @@ class DeleteRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26365,6 +30509,64 @@ class DeleteRegionBackendServiceRequest(proto.Message): ) +class DeleteRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Delete. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck resource to + delete. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class DeleteRegionDiskRequest(proto.Message): r"""A request message for RegionDisks.Delete. See the method description for details. @@ -26385,17 +30587,21 @@ class DeleteRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26419,6 +30625,64 @@ class DeleteRegionDiskRequest(proto.Message): ) +class DeleteRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Delete. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_aggregation_policy (str): + Name of the HealthAggregationPolicy resource + to delete. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class DeleteRegionHealthCheckRequest(proto.Message): r"""A request message for RegionHealthChecks.Delete. See the method description for details. @@ -26438,17 +30702,21 @@ class DeleteRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26493,17 +30761,21 @@ class DeleteRegionHealthCheckServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26546,17 +30818,21 @@ class DeleteRegionHealthSourceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26599,17 +30875,21 @@ class DeleteRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26643,29 +30923,35 @@ class DeleteRegionInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. region (str): - The name of the region scoping this request. - Name should conform to RFC1035. + The name of the region + scoping this request. Name should conform to + RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resize_request (str): @@ -26716,17 +31002,21 @@ class DeleteRegionInstanceTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26770,17 +31060,21 @@ class DeleteRegionInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26823,17 +31117,21 @@ class DeleteRegionMultiMigRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26871,25 +31169,29 @@ class DeleteRegionNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26932,17 +31234,21 @@ class DeleteRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -26986,17 +31292,21 @@ class DeleteRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -27040,17 +31350,21 @@ class DeleteRegionNotificationEndpointRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -27126,17 +31440,21 @@ class DeleteRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -27179,17 +31497,21 @@ class DeleteRegionSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot (str): @@ -27232,17 +31554,21 @@ class DeleteRegionSslCertificateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_certificate (str): @@ -27286,17 +31612,21 @@ class DeleteRegionSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -27341,17 +31671,21 @@ class DeleteRegionTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -27395,17 +31729,21 @@ class DeleteRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -27449,17 +31787,21 @@ class DeleteRegionTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxy (str): @@ -27541,17 +31883,21 @@ class DeleteReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): @@ -27596,17 +31942,21 @@ class DeleteResourcePolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource_policy (str): @@ -27654,17 +32004,21 @@ class DeleteRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -27711,17 +32065,21 @@ class DeleteRouteRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route (str): @@ -27760,17 +32118,21 @@ class DeleteRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -27811,17 +32173,21 @@ class DeleteSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -27860,17 +32226,21 @@ class DeleteServiceAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. service_attachment (str): @@ -27918,17 +32288,21 @@ class DeleteSignedUrlKeyBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -27973,17 +32347,21 @@ class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -28022,17 +32400,21 @@ class DeleteSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot (str): @@ -28069,17 +32451,21 @@ class DeleteSslCertificateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_certificate (str): @@ -28117,17 +32503,21 @@ class DeleteSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -28166,17 +32556,21 @@ class DeleteStoragePoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. storage_pool (str): @@ -28221,17 +32615,21 @@ class DeleteSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -28272,17 +32670,21 @@ class DeleteTargetGrpcProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_grpc_proxy (str): @@ -28320,17 +32722,21 @@ class DeleteTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -28368,17 +32774,21 @@ class DeleteTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -28416,17 +32826,21 @@ class DeleteTargetInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_instance (str): @@ -28472,17 +32886,21 @@ class DeleteTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -28523,17 +32941,21 @@ class DeleteTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxy (str): @@ -28571,17 +32993,21 @@ class DeleteTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxy (str): @@ -28621,17 +33047,21 @@ class DeleteTargetVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_vpn_gateway (str): @@ -28672,17 +33102,21 @@ class DeleteUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map (str): @@ -28721,17 +33155,21 @@ class DeleteVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. vpn_gateway (str): @@ -28774,17 +33212,21 @@ class DeleteVpnTunnelRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. vpn_tunnel (str): @@ -28826,15 +33268,18 @@ class DeleteWireGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -28896,6 +33341,64 @@ class DeleteZoneOperationResponse(proto.Message): """ +class DeleteZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Delete. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy (str): + Name of the zone VM extension policy to + delete. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + vm_extension_policy: str = proto.Field( + proto.STRING, + number=331532730, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class Denied(proto.Message): r""" @@ -28907,8 +33410,8 @@ class Denied(proto.Message): The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp) or the IP - protocol number. + udp,icmp, esp, ah, ipip,sctp) or the IP protocol + number. This field is a member of `oneof`_ ``_I_p_protocol``. ports (MutableSequence[str]): @@ -28916,7 +33419,9 @@ class Denied(proto.Message): field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any - port. Example inputs include: ["22"], ["80","443"], and + port. + + Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. """ @@ -28950,17 +33455,21 @@ class DeprecateImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -29024,14 +33533,14 @@ class DeprecationStatus(proto.Message): This field is a member of `oneof`_ ``_replacement``. state (str): The deprecation state of this resource. This - can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. + can be ACTIVE,DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life - date for an image, can use ACTIVE. Operations - which create a new resource using a DEPRECATED + date for an image, can useACTIVE. Operations + which create a new resource using aDEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which - use OBSOLETE or DELETED resources will be + use OBSOLETE orDELETED resources will be rejected and result in an error. Check the State enum for the list of possible values. @@ -29044,25 +33553,26 @@ class DeprecationStatus(proto.Message): deprecated state. When the rollout policy does not include the user specified zone, or if the zone is rolled out, the associated resource is - considered in a deprecated state. The rollout - policy for this deprecation is read-only, except - for allowlisted users. This field might not be - configured. To view the latest non-deprecated - image in a specific zone, use the - imageFamilyViews.get method. + considered in a deprecated state. + + The rollout policy for this deprecation is + read-only, except for allowlisted users. This + field might not be configured. To view the + latest non-deprecated image in a specific zone, + use theimageFamilyViews.get method. This field is a member of `oneof`_ ``_state_override``. """ class State(proto.Enum): - r"""The deprecation state of this resource. This can be ACTIVE, - DEPRECATED, OBSOLETE, or DELETED. Operations which communicate - the end of life date for an image, can use ACTIVE. Operations - which create a new resource using a DEPRECATED resource will - return successfully, but with a warning indicating the - deprecated resource and recommending its replacement. Operations - which use OBSOLETE or DELETED resources will be rejected and - result in an error. + r"""The deprecation state of this resource. This can be + ACTIVE,DEPRECATED, OBSOLETE, or DELETED. Operations which + communicate the end of life date for an image, can useACTIVE. + Operations which create a new resource using aDEPRECATED + resource will return successfully, but with a warning indicating + the deprecated resource and recommending its replacement. + Operations which use OBSOLETE orDELETED resources will be + rejected and result in an error. Values: UNDEFINED_STATE (0): @@ -29137,17 +33647,21 @@ class DetachDiskInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -29199,17 +33713,21 @@ class DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -29256,23 +33774,27 @@ class DetachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ network_endpoint_group: str = proto.Field( @@ -29315,24 +33837,27 @@ class DetachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. region_network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest): The body resource for this request request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -29377,17 +33902,21 @@ class DisableXpnHostProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -29420,17 +33949,21 @@ class DisableXpnResourceProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -29452,31 +33985,42 @@ class DisableXpnResourceProjectRequest(proto.Message): class Disk(proto.Message): - r"""Represents a Persistent Disk resource. Google Compute Engine has two - Disk resources: \* - `Zonal `__ \* - `Regional `__ + r"""Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read - Storage options. The disks resource represents a zonal persistent - disk. For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent disk. For more - information, read Regional resources. + Storage options. + + The disks resource represents a zonal persistent disk. For more + information, readZonal persistent disks. + + The regionDisks resource represents a regional persistent disk. For + more information, read Regional resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: access_mode (str): - The access mode of the disk. - READ_WRITE_SINGLE: The - default AccessMode, means the disk can be attached to single - instance in RW mode. - READ_WRITE_MANY: The AccessMode means - the disk can be attached to multiple instances in RW mode. - - READ_ONLY_MANY: The AccessMode means the disk can be - attached to multiple instances in RO mode. The AccessMode is - only valid for Hyperdisk disk types. Check the AccessMode - enum for the list of possible values. + The access mode of the disk. + + :: + + - READ_WRITE_SINGLE: The default AccessMode, means the + disk can be attached to single instance in RW mode. + - READ_WRITE_MANY: The AccessMode means the disk can be + attached to multiple instances in RW mode. + - READ_ONLY_MANY: The AccessMode means the disk can be + attached to multiple instances in RO mode. + + The AccessMode is only valid for Hyperdisk disk types. Check + the AccessMode enum for the list of possible values. This field is a member of `oneof`_ ``_access_mode``. architecture (str): @@ -29494,7 +34038,7 @@ class Disk(proto.Message): [Output Only] A list of disks this disk is asynchronously replicated to. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -29505,24 +34049,32 @@ class Disk(proto.Message): This field is a member of `oneof`_ ``_description``. disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): Encrypts the disk using a customer-supplied encryption key - or a customer-managed encryption key. Encryption keys do not - protect access to metadata of the disk. After you encrypt a - disk with a customer-supplied key, you must provide the same - key if you use the disk later. For example, to create a disk - snapshot, to create a disk image, to create a machine image, - or to attach the disk to a virtual machine. After you - encrypt a disk with a customer-managed key, the - diskEncryptionKey.kmsKeyName is set to a key *version* name - once the disk is created. The disk is encrypted with this - version of the key. In the response, + or a customer-managed encryption key. + + Encryption keys do not protect access to metadata of the + disk. + + After you encrypt a disk with a customer-supplied key, you + must provide the same key if you use the disk later. For + example, to create a disk snapshot, to create a disk image, + to create a machine image, or to attach the disk to a + virtual machine. + + After you encrypt a disk with a customer-managed key, + thediskEncryptionKey.kmsKeyName is set to a key *version* + name once the disk is created. The disk is encrypted with + this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following - format: "diskEncryptionKey.kmsKeyName": + format: + + "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ - key_region/cryptoKeys/key /cryptoKeysVersions/version If you - do not provide an encryption key when creating the disk, - then the disk is encrypted using an automatically generated - key and you don't need to provide a key to use the disk - later. + key_region/cryptoKeys/key /cryptoKeysVersions/version + + If you do not provide an encryption key when creating the + disk, then the disk is encrypted using an automatically + generated key and you don't need to provide a key to use the + disk later. This field is a member of `oneof`_ ``_disk_encryption_key``. enable_confidential_compute (bool): @@ -29549,7 +34101,7 @@ class Disk(proto.Message): interface (str): [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The - default is SCSI. Check the Interface enum for the list of + default isSCSI. Check the Interface enum for the list of possible values. This field is a member of `oneof`_ ``_interface``. @@ -29567,20 +34119,21 @@ class Disk(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a disk. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a disk. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this disk. These can be later modified by the setLabels method. last_attach_timestamp (str): - [Output Only] Last attach timestamp in RFC3339 text format. + [Output Only] Last attach timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_last_attach_timestamp``. last_detach_timestamp (str): - [Output Only] Last detach timestamp in RFC3339 text format. + [Output Only] Last detach timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_last_detach_timestamp``. license_codes (MutableSequence[int]): @@ -29599,17 +34152,29 @@ class Disk(proto.Message): [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following - operations to become irreversibly prohibited: - R/W or R/O - disk attachment to any other instance - Disk detachment. And - the disk can only be deleted when the instance is deleted - - Creation of images or snapshots - Disk cloning Furthermore, - the instance with at least one disk with locked flag set to - true will be prohibited from performing the operations - below: - Further attachment of secondary disks. - Detachment - of any disks - Create machine images - Create instance - template - Delete the instance with --keep-disk parameter - set to true for locked disks - Attach a locked disk with - --auto-delete parameter set to false + operations to become irreversibly prohibited: + + :: + + - R/W or R/O disk attachment to any other instance + - Disk detachment. And the disk can only be deleted when the instance + is deleted + - Creation of images or snapshots + - Disk cloning + + Furthermore, the instance with at least one disk with locked + flag set to true will be prohibited from performing the + operations below: + + :: + + - Further attachment of secondary disks. + - Detachment of any disks + - Create machine images + - Create instance template + - Delete the instance with --keep-disk parameter set to true for locked + disks + - Attach a locked disk with --auto-delete parameter set to false This field is a member of `oneof`_ ``_locked``. multi_writer (bool): @@ -29620,7 +34185,7 @@ class Disk(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -29641,8 +34206,8 @@ class Disk(proto.Message): Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is - 4096, other sizes may be added in the future. If - an unsupported value is requested, the error + 4096, other sizes may be added in the future. + If an unsupported value is requested, the error message will list the supported values for the caller's project. @@ -29652,7 +34217,7 @@ class Disk(proto.Message): disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, - see the Extreme persistent disk documentation. + see theExtreme persistent disk documentation. This field is a member of `oneof`_ ``_provisioned_iops``. provisioned_throughput (int): @@ -29696,12 +34261,14 @@ class Disk(proto.Message): size_gb (int): Size, in GB, of the persistent disk. You can specify this field when creating a persistent - disk using the sourceImage, sourceSnapshot, or - sourceDisk parameter, or specify it alone to - create an empty persistent disk. If you specify - this field along with a source, the value of - sizeGb must not be less than the size of the - source. Acceptable values are greater than 0. + disk using thesourceImage, sourceSnapshot, + orsourceDisk parameter, or specify it alone to + create an empty persistent disk. + + If you specify this field along with a source, + the value ofsizeGb must not be less than the + size of the source. + Acceptable values are greater than 0. This field is a member of `oneof`_ ``_size_gb``. source_consistency_group_policy (str): @@ -29718,15 +34285,26 @@ class Disk(proto.Message): The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk + + - + projects/project/zones/zone/disks/disk + + - + projects/project/regions/region/disks/disk + + - + zones/zone/disks/disk + + - + regions/region/disks/disk This field is a member of `oneof`_ ``_source_disk``. source_disk_id (str): @@ -29741,29 +34319,40 @@ class Disk(proto.Message): source_image (str): The source image used to create this disk. If the source image is deleted, this field will not - be set. To create a disk with one of the public + be set. + + To create a disk with one of the public operating system images, specify the image by - its family name. For example, specify - family/debian-9 to use the latest Debian 9 - image: + its family name. For example, + specifyfamily/debian-9 to use the latest Debian + 9 image: + projects/debian-cloud/global/images/family/debian-9 + Alternatively, use a specific version of a public operating system image: + projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD + To create a disk with a custom image that you created, specify the image name in the following - format: global/images/my-custom-image You can - also specify a custom image by its image family, - which returns the latest version of the image in - that family. Replace the image name with - family/family-name: + format: + + global/images/my-custom-image + + You can also specify a custom image by its image + family, which returns the latest version of the + image in that family. Replace the image name + with family/family-name: + global/images/family/my-image-family This field is a member of `oneof`_ ``_source_image``. source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source image. Required if the source image is - protected by a customer-supplied encryption key. + Thecustomer-supplied + encryption key of the source image. Required if + the source image is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_source_image_encryption_key``. source_image_id (str): @@ -29779,11 +34368,14 @@ class Disk(proto.Message): The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instantSnapshots/instantSnapshot - - projects/project/zones/zone/instantSnapshots/instantSnapshot - - zones/zone/instantSnapshots/instantSnapshot + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot + - + projects/project/zones/zone/instantSnapshots/instantSnapshot + - zones/zone/instantSnapshots/instantSnapshot This field is a member of `oneof`_ ``_source_instant_snapshot``. source_instant_snapshot_id (str): @@ -29800,18 +34392,20 @@ class Disk(proto.Message): The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are - valid values: - - https://www.googleapis.com/compute/v1/projects/project - /global/snapshots/snapshot - - projects/project/global/snapshots/snapshot - - global/snapshots/snapshot + valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot + - projects/project/global/snapshots/snapshot + - global/snapshots/snapshot This field is a member of `oneof`_ ``_source_snapshot``. source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source snapshot. Required if the source snapshot - is protected by a customer-supplied encryption - key. + Thecustomer-supplied + encryption key of the source snapshot. Required + if the source snapshot is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. source_snapshot_id (str): @@ -29838,22 +34432,32 @@ class Disk(proto.Message): This field is a member of `oneof`_ ``_source_storage_object``. status (str): - [Output Only] The status of disk creation. - CREATING: Disk - is provisioning. - RESTORING: Source data is being copied - into the disk. - FAILED: Disk creation failed. - READY: Disk - is ready for use. - DELETING: Disk is deleting. Check the - Status enum for the list of possible values. + [Output Only] The status of disk creation. + + :: + + - CREATING: Disk is provisioning. + - RESTORING: Source data is being copied into the + disk. + - FAILED: Disk creation failed. + - READY: Disk is ready for use. + - DELETING: Disk is deleting. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. storage_pool (str): The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /storagePools/storagePool - - projects/project/zones/zone/storagePools/storagePool - - zones/zone/storagePools/storagePool + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool + - + projects/project/zones/zone/storagePools/storagePool + - zones/zone/storagePools/storagePool This field is a member of `oneof`_ ``_storage_pool``. storage_type (str): @@ -29865,9 +34469,8 @@ class Disk(proto.Message): URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For - example: projects/project - /zones/zone/diskTypes/pd-ssd . See Persistent - disk types. + example:projects/project/zones/zone/diskTypes/pd-ssd. + See Persistent disk types. This field is a member of `oneof`_ ``_type``. user_licenses (MutableSequence[str]): @@ -29876,11 +34479,12 @@ class Disk(proto.Message): can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: + https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch users (MutableSequence[str]): [Output Only] Links to the users of the disk (attached - instances) in form: - projects/project/zones/zone/instances/instance + instances) in + form:projects/project/zones/zone/instances/instance zone (str): [Output Only] URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It @@ -29890,12 +34494,18 @@ class Disk(proto.Message): """ class AccessMode(proto.Enum): - r"""The access mode of the disk. - READ_WRITE_SINGLE: The default - AccessMode, means the disk can be attached to single instance in RW - mode. - READ_WRITE_MANY: The AccessMode means the disk can be - attached to multiple instances in RW mode. - READ_ONLY_MANY: The - AccessMode means the disk can be attached to multiple instances in - RO mode. The AccessMode is only valid for Hyperdisk disk types. + r"""The access mode of the disk. + + :: + + - READ_WRITE_SINGLE: The default AccessMode, means the + disk can be attached to single instance in RW mode. + - READ_WRITE_MANY: The AccessMode means the disk can be + attached to multiple instances in RW mode. + - READ_ONLY_MANY: The AccessMode means the disk can be + attached to multiple instances in RO mode. + + The AccessMode is only valid for Hyperdisk disk types. Values: UNDEFINED_ACCESS_MODE (0): @@ -29938,7 +34548,7 @@ class Architecture(proto.Enum): class Interface(proto.Enum): r"""[Deprecated] Specifies the disk interface to use for attaching this - disk, which is either SCSI or NVME. The default is SCSI. + disk, which is either SCSI or NVME. The default isSCSI. Values: UNDEFINED_INTERFACE (0): @@ -29957,10 +34567,16 @@ class Interface(proto.Enum): UNSPECIFIED = 526786327 class Status(proto.Enum): - r"""[Output Only] The status of disk creation. - CREATING: Disk is - provisioning. - RESTORING: Source data is being copied into the - disk. - FAILED: Disk creation failed. - READY: Disk is ready for - use. - DELETING: Disk is deleting. + r"""[Output Only] The status of disk creation. + + :: + + - CREATING: Disk is provisioning. + - RESTORING: Source data is being copied into the + disk. + - FAILED: Disk creation failed. + - READY: Disk is ready for use. + - DELETING: Disk is deleting. Values: UNDEFINED_STATUS (0): @@ -30303,15 +34919,15 @@ class DiskAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.DisksScopedList]): A list of DisksScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#diskAggregatedList for aggregated lists of + [Output Only] Type of resource. + Alwayscompute#diskAggregatedList for aggregated lists of persistent disks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -30391,11 +35007,13 @@ class DiskAsyncReplication(proto.Message): The other disk asynchronously replicated to or from the current disk. You can provide this as a partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk + example, the following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk This field is a member of `oneof`_ ``_disk``. disk_id (str): @@ -30479,42 +35097,54 @@ class DiskInstantiationConfig(proto.Message): This field is a member of `oneof`_ ``_device_name``. instantiate_from (str): Specifies whether to include the disk and - what image to use. Possible values are: - - source-image: to use the same image that was - used to create the source instance's - corresponding disk. Applicable to the boot disk - and additional read-write disks. - - source-image-family: to use the same image - family that was used to create the source - instance's corresponding disk. Applicable to the - boot disk and additional read-write disks. - - custom-image: to use a user-provided image url - for disk creation. Applicable to the boot disk - and additional read-write disks. - - attach-read-only: to attach a read-only disk. - Applicable to read-only disks. - do-not-include: - to exclude a disk from the template. Applicable - to additional read-write disks, local SSDs, and - read-only disks. Check the InstantiateFrom enum - for the list of possible values. + what image to use. Possible values are: + + + - source-image: to use the same image that + was used to create the source instance's + corresponding disk. Applicable to the boot + disk and additional read-write disks. + - source-image-family: to use the same + image family that was used to create the + source instance's corresponding disk. + Applicable to the boot disk and + additional read-write disks. + - custom-image: to use a user-provided + image url for disk creation. Applicable + to the boot disk and additional read-write + disks. + - attach-read-only: to attach a read-only + disk. Applicable to read-only disks. + - do-not-include: to exclude a disk from + the template. Applicable to additional + read-write disks, local SSDs, and read-only + disks. + Check the InstantiateFrom enum for the list of + possible values. This field is a member of `oneof`_ ``_instantiate_from``. """ class InstantiateFrom(proto.Enum): r"""Specifies whether to include the disk and what image to use. - Possible values are: - source-image: to use the same image that - was used to create the source instance's corresponding disk. - Applicable to the boot disk and additional read-write disks. - - source-image-family: to use the same image family that was used - to create the source instance's corresponding disk. Applicable - to the boot disk and additional read-write disks. - - custom-image: to use a user-provided image url for disk - creation. Applicable to the boot disk and additional read-write - disks. - attach-read-only: to attach a read-only disk. - Applicable to read-only disks. - do-not-include: to exclude a - disk from the template. Applicable to additional read-write - disks, local SSDs, and read-only disks. + Possible values are: + + + - source-image: to use the same image that was used to + create the source instance's corresponding disk. Applicable to + the boot disk and additional read-write disks. + - source-image-family: to use the same image family that + was used to create the source instance's corresponding disk. + Applicable to the boot disk and additional read-write + disks. + - custom-image: to use a user-provided image url for disk + creation. Applicable to the boot disk and additional + read-write disks. + - attach-read-only: to attach a read-only + disk. Applicable to read-only disks. + - do-not-include: to exclude a disk from the template. + Applicable to additional read-write disks, local SSDs, and + read-only disks. Values: UNDEFINED_INSTANTIATE_FROM (0): @@ -30554,8 +35184,9 @@ class InstantiateFrom(proto.Enum): creation of the source instance's corresponding disk. The request will fail if the source image of the source disk does not belong to any image - family. Applicable to: boot disk, additional - read-write disks. + family. Applicable to: + + boot disk, additional read-write disks. """ UNDEFINED_INSTANTIATE_FROM = 0 ATTACH_READ_ONLY = 513775419 @@ -30609,7 +35240,7 @@ class DiskList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -30672,19 +35303,23 @@ class DiskMoveRequest(proto.Message): The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a - zone: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - - projects/project/zones/zone - zones/zone + zone: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone + - projects/project/zones/zone + - zones/zone This field is a member of `oneof`_ ``_destination_zone``. target_disk (str): The URL of the target disk to move. This can be a full or partial URL. For example, the - following are all valid URLs to a disk: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk + following are all valid URLs to a disk: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk This field is a member of `oneof`_ ``_target_disk``. """ @@ -30888,23 +35523,29 @@ class DiskSettingsAccessLocationAccessLocationPreference(proto.Message): class DiskType(proto.Message): - r"""Represents a Disk Type resource. Google Compute Engine has two Disk - Type resources: \* - `Regional `__ \* - `Zonal `__ You can - choose from a variety of disk types based on your needs. For more - information, read Storage options. The diskTypes resource represents - disk types for a zonal persistent disk. For more information, read - Zonal persistent disks. The regionDiskTypes resource represents disk - types for a regional persistent disk. For more information, read - Regional persistent disks. + r"""Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + + You can choose from a variety of disk types based on your needs. For + more information, readStorage options. + + The diskTypes resource represents disk types for a zonal persistent + disk. For more information, readZonal persistent disks. + + The regionDiskTypes resource represents disk types for a regional + persistent disk. For more information, read Regional persistent + disks. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. default_disk_size_gb (int): @@ -31030,14 +35671,14 @@ class DiskTypeAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.DiskTypesScopedList]): A list of DiskTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#diskTypeAggregatedList. + [Output Only] Type of resource. + Alwayscompute#diskTypeAggregatedList. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -31118,7 +35759,7 @@ class DiskTypeList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -31288,15 +35929,26 @@ class DisksStartAsyncReplicationRequest(proto.Message): The secondary disk to start asynchronous replication to. You can provide this as a partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + example, the following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk + + - + projects/project/zones/zone/disks/disk + + - + projects/project/regions/region/disks/disk + + - + zones/zone/disks/disk + + - + regions/region/disks/disk This field is a member of `oneof`_ ``_async_secondary_disk``. """ @@ -31321,11 +35973,17 @@ class DisksStopGroupAsyncReplicationResource(proto.Message): resource_policy (str): The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full - or partial URL, such as: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - + or partial URL, such as: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + + - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + + - + regions/region/resourcePolicies/resourcePolicy This field is a member of `oneof`_ ``_resource_policy``. """ @@ -31366,10 +36024,10 @@ class DistributionPolicy(proto.Message): target_shape (str): The distribution shape to which the group converges either proactively or on resize events - (depending on the value set in - updatePolicy.instanceRedistributionType). Check - the TargetShape enum for the list of possible - values. + (depending on the value set + inupdatePolicy.instanceRedistributionType). + Check the TargetShape enum for the list of + possible values. This field is a member of `oneof`_ ``_target_shape``. zones (MutableSequence[google.cloud.compute_v1beta.types.DistributionPolicyZoneConfiguration]): @@ -31379,8 +36037,8 @@ class DistributionPolicy(proto.Message): class TargetShape(proto.Enum): r"""The distribution shape to which the group converges either - proactively or on resize events (depending on the value set in - updatePolicy.instanceRedistributionType). + proactively or on resize events (depending on the value set + inupdatePolicy.instanceRedistributionType). Values: UNDEFINED_TARGET_SHAPE (0): @@ -31442,9 +36100,9 @@ class DistributionPolicyZoneConfiguration(proto.Message): Attributes: zone (str): - The URL of the zone. The zone must exist in - the region where the managed instance group is - located. + The URL of thezone. + The zone must exist in the region where the + managed instance group is located. This field is a member of `oneof`_ ``_zone``. """ @@ -31509,17 +36167,21 @@ class EnableXpnHostProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -31552,17 +36214,21 @@ class EnableXpnResourceProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -31646,16 +36312,35 @@ class ErrorDetails(proto.Message): class ErrorInfo(proto.Message): - r"""Describes the cause of the error with structured details. Example of - an error when contacting the "pubsub.googleapis.com" API when it is - not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" - "metadata": { "resource": "projects/123", "service": - "pubsub.googleapis.com" } } This response indicates that the - pubsub.googleapis.com API is not enabled. Example of an error that - is returned when attempting to create a Spanner instance in a region - that is out of stock: { "reason": "STOCKOUT" "domain": - "spanner.googleapis.com", "metadata": { "availableRegions": - "us-central1,us-east2" } } + r"""Describes the cause of the error with structured details. + + Example of an error when contacting the "pubsub.googleapis.com" API + when it is not enabled: + + :: + + { "reason": "API_DISABLED" + "domain": "googleapis.com" + "metadata": { + "resource": "projects/123", + "service": "pubsub.googleapis.com" + } + } + + This response indicates that the pubsub.googleapis.com API is not + enabled. + + Example of an error that is returned when attempting to create a + Spanner instance in a region that is out of stock: + + :: + + { "reason": "STOCKOUT" + "domain": "spanner.googleapis.com", + "metadata": { + "availableRegions": "us-central1,us-east2" + } + } .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -31675,12 +36360,13 @@ class ErrorInfo(proto.Message): This field is a member of `oneof`_ ``_domain``. metadatas (MutableMapping[str, str]): - Additional structured details about this error. Keys must - match a regular expression of ``a-z+`` but should ideally be - lowerCamelCase. Also, they must be limited to 64 characters - in length. When identifying the current value of an exceeded - limit, the units should be contained in the key, not the - value. For example, rather than + Additional structured details about this error. + + Keys must match a regular expression of ``a-z+`` but should + ideally be lowerCamelCase. Also, they must be limited to 64 + characters in length. When identifying the current value of + an exceeded limit, the units should be contained in the key, + not the value. For example, rather than ``{"instanceLimit": "100/request"}``, should be returned as, ``{"instanceLimitPerRequest": "100"}``, if the client exceeds the number of instances that can be created in a @@ -31859,15 +36545,15 @@ class ExchangedPeeringRoutesList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ExchangedPeeringRoute]): A list of ExchangedPeeringRoute resources. kind (str): - [Output Only] Type of resource. Always - compute#exchangedPeeringRoutesList for exchanged peering - routes lists. + [Output Only] Type of resource. + Alwayscompute#exchangedPeeringRoutesList for exchanged + peering routes lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -31937,17 +36623,21 @@ class ExpandIpCidrRangeSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -31984,21 +36674,43 @@ class Expr(proto.Message): r"""Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at - https://github.com/google/cel-spec. Example (Comparison): title: - "Summary size limit" description: "Determines if a summary is less - than 100 chars" expression: "document.summary.size() < 100" Example - (Equality): title: "Requestor is owner" description: "Determines if - requestor is the document owner" expression: "document.owner == - request.auth.claims.email" Example (Logic): title: "Public - documents" description: "Determine whether the document should be - publicly visible" expression: "document.type != 'private' && - document.type != 'internal'" Example (Data Manipulation): title: - "Notification string" description: "Create a notification string - with a timestamp." expression: "'New message received at ' + - string(document.create_time)" The exact variables and functions that - may be referenced within an expression are determined by the service - that evaluates it. See the service documentation for additional - information. + https://github.com/google/cel-spec. + + Example (Comparison): + + :: + + title: "Summary size limit" + description: "Determines if a summary is less than 100 chars" + expression: "document.summary.size() < 100" + + Example (Equality): + + :: + + title: "Requestor is owner" + description: "Determines if requestor is the document owner" + expression: "document.owner == request.auth.claims.email" + + Example (Logic): + + :: + + title: "Public documents" + description: "Determine whether the document should be publicly visible" + expression: "document.type != 'private' && document.type != 'internal'" + + Example (Data Manipulation): + + :: + + title: "Notification string" + description: "Create a notification string with a timestamp." + expression: "'New message received at ' + string(document.create_time)" + + The exact variables and functions that may be referenced within an + expression are determined by the service that evaluates it. See the + service documentation for additional information. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -32053,22 +36765,26 @@ class Expr(proto.Message): class ExternalVpnGateway(proto.Message): - r"""Represents an external VPN gateway. External VPN gateway is - the on-premises VPN gateway(s) or another cloud provider's VPN - gateway that connects to your Google Cloud VPN gateway. To - create a highly available VPN from Google Cloud Platform to your - VPN gateway or another cloud provider's VPN gateway, you must - create a external VPN gateway resource with information about - the other gateway. For more information about using external VPN - gateways, see Creating an HA VPN gateway and tunnel pair to a - peer VPN. + r"""Represents an external VPN gateway. + + External VPN gateway is the on-premises VPN gateway(s) or + another cloud provider's VPN gateway that connects to your + Google Cloud VPN gateway. + + To create a highly available VPN from Google Cloud Platform to + your VPN gateway or another cloud provider's VPN gateway, you + must create a external VPN gateway resource with information + about the other gateway. + + For more information about using external VPN gateways, see + Creating an HA VPN gateway and tunnel pair to a peer VPN. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -32084,16 +36800,16 @@ class ExternalVpnGateway(proto.Message): This field is a member of `oneof`_ ``_id``. interfaces (MutableSequence[google.cloud.compute_v1beta.types.ExternalVpnGatewayInterface]): A list of interfaces for this external VPN - gateway. If your peer-side gateway is an - on-premises gateway and non-AWS cloud providers' - gateway, at most two interfaces can be provided - for an external VPN gateway. If your peer side - is an AWS virtual private gateway, four - interfaces should be provided for an external - VPN gateway. + gateway. + If your peer-side gateway is an on-premises + gateway and non-AWS cloud providers' gateway, at + most two interfaces can be provided for an + external VPN gateway. If your peer side is an + AWS virtual private gateway, four interfaces + should be provided for an external VPN gateway. kind (str): - [Output Only] Type of the resource. Always - compute#externalVpnGateway for externalVpnGateways. + [Output Only] Type of the resource. + Alwayscompute#externalVpnGateway for externalVpnGateways. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -32105,21 +36821,21 @@ class ExternalVpnGateway(proto.Message): request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - ExternalVpnGateway. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an ExternalVpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -32174,12 +36890,14 @@ class RedundancyType(proto.Enum): addresses which are redundant with each other, the following two types of setup on your on-premises side would have this type of - redundancy: (1) Two separate on-premises - gateways, each with one public IP address, the - two on-premises gateways are redundant with each - other. (2) A single on-premise gateway with two - public IP addresses that are redundant with - eatch other. + redundancy: + + (1) Two separate on-premises gateways, each with + one public IP address, the two on-premises + gateways are redundant with each other. (2) A + single on-premise gateway with two public IP + addresses that are redundant with eatch + other. """ UNDEFINED_REDUNDANCY_TYPE = 0 FOUR_IPS_REDUNDANCY = 520087913 @@ -32247,8 +36965,13 @@ class ExternalVpnGatewayInterface(proto.Message): id (int): The numeric ID of this interface. The allowed input values for this id for different redundancy types of external VPN - gateway: - SINGLE_IP_INTERNALLY_REDUNDANT - 0 - - TWO_IPS_REDUNDANCY - 0, 1 - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 + gateway: + + :: + + - SINGLE_IP_INTERNALLY_REDUNDANT - 0 + - TWO_IPS_REDUNDANCY - 0, 1 + - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 This field is a member of `oneof`_ ``_id``. ip_address (str): @@ -32318,7 +37041,7 @@ class ExternalVpnGatewayList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -32426,9 +37149,11 @@ class FileType(proto.Enum): class Firewall(proto.Message): - r"""Represents a Firewall Rule resource. Firewall rules allow or - deny ingress traffic to, and egress traffic from your instances. - For more information, read Firewall rules. + r"""Represents a Firewall Rule resource. + + Firewall rules allow or deny ingress traffic to, and egress + traffic from your instances. For more information, readFirewall + rules. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -32440,7 +37165,7 @@ class Firewall(proto.Message): port-range tuple that describes a permitted connection. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. denied (MutableSequence[google.cloud.compute_v1beta.types.Denied]): @@ -32457,7 +37182,7 @@ class Firewall(proto.Message): If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These - ranges must be expressed in CIDR format. Both + ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported. direction (str): Direction of traffic to which this firewall applies, either @@ -32501,7 +37226,7 @@ class Firewall(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -32514,13 +37239,18 @@ class Firewall(proto.Message): URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: - global/networks/default If you choose to specify - this field, you can specify the network as a - full or partial URL. For example, the following - are all valid URLs: - + + global/networks/default + + If you choose to specify this field, you can + specify the network as a full or partial URL. + For example, the following are all valid URLs: + + - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - - projects/myproject/global/networks/my-network - - global/networks/default + - + projects/myproject/global/networks/my-network + - global/networks/default This field is a member of `oneof`_ ``_network``. params (google.cloud.compute_v1beta.types.FirewallParams): @@ -32549,14 +37279,15 @@ class Firewall(proto.Message): If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be - expressed in CIDR format. One or both of - sourceRanges and sourceTags may be set. If both - fields are set, the rule applies to traffic that - has a source IP address within sourceRanges OR a - source IP from a resource with a matching tag - listed in the sourceTags field. The connection - does not need to match both fields for the rule - to apply. Both IPv4 and IPv6 are supported. + expressed inCIDR format. One or both of + sourceRanges and sourceTags may be set. + If both fields are set, the rule applies to + traffic that has a source IP address within + sourceRanges OR a source IP from a resource with + a matching tag listed in thesourceTags field. + The connection does not need to match both + fields for the rule to + apply. Both IPv4 and IPv6 are supported. source_service_accounts (MutableSequence[str]): If source service accounts are specified, the firewall rules apply only to traffic originating @@ -32564,16 +37295,16 @@ class Firewall(proto.Message): list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated - with an instance, not an IP address. - sourceRanges can be set at the same time as - sourceServiceAccounts. If both are set, the + with an instance, not an IP address.sourceRanges + can be set at the same time + assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account - listed in sourceServiceAccount. The connection + listed insourceServiceAccount. The connection does not need to match both fields for the - firewall to apply. sourceServiceAccounts cannot - be used at the same time as sourceTags or + firewall to apply.sourceServiceAccounts cannot + be used at the same time assourceTags or targetTags. source_tags (MutableSequence[str]): If source tags are specified, the firewall @@ -32596,8 +37327,8 @@ class Firewall(proto.Message): target_service_accounts (MutableSequence[str]): A list of service accounts indicating sets of instances located in the network that may make network connections as - specified in allowed[]. targetServiceAccounts cannot be used - at the same time as targetTags or sourceTags. If neither + specified inallowed[].targetServiceAccounts cannot be used + at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. @@ -32755,7 +37486,7 @@ class FirewallList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -32870,11 +37601,15 @@ class FirewallParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -32893,8 +37628,8 @@ class FirewallPoliciesListAssociationsResponse(proto.Message): associations (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyAssociation]): A list of associations. kind (str): - [Output Only] Type of firewallPolicy associations. Always - compute#FirewallPoliciesListAssociations for lists of + [Output Only] Type of firewallPolicy associations. + Alwayscompute#FirewallPoliciesListAssociations for lists of firewallPolicy associations. This field is a member of `oneof`_ ``_kind``. @@ -32951,7 +37686,7 @@ class FirewallPolicy(proto.Message): A list of associations that belong to this firewall policy. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -32984,9 +37719,10 @@ class FirewallPolicy(proto.Message): or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make get() request to the - firewall policy. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make get() + request to the firewall policy. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -32995,8 +37731,8 @@ class FirewallPolicy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#firewallPolicyfor firewall policies + [Output only] Type of the resource. + Alwayscompute#firewallPolicyfor firewall policies This field is a member of `oneof`_ ``_kind``. name (str): @@ -33021,10 +37757,11 @@ class FirewallPolicy(proto.Message): This field is a member of `oneof`_ ``_policy_source``. policy_type (str): - The type of the firewall policy. This field can be either - VPC_POLICY or RDMA_ROCE_POLICY. Note: if not specified then - VPC_POLICY will be used. Check the PolicyType enum for the - list of possible values. + The type of the firewall policy. This field can be + eitherVPC_POLICY or RDMA_ROCE_POLICY. + + Note: if not specified then VPC_POLICY will be used. Check + the PolicyType enum for the list of possible values. This field is a member of `oneof`_ ``_policy_type``. region (str): @@ -33091,9 +37828,10 @@ class PolicySource(proto.Enum): USER_DEFINED = 491485557 class PolicyType(proto.Enum): - r"""The type of the firewall policy. This field can be either VPC_POLICY - or RDMA_ROCE_POLICY. Note: if not specified then VPC_POLICY will be - used. + r"""The type of the firewall policy. This field can be eitherVPC_POLICY + or RDMA_ROCE_POLICY. + + Note: if not specified then VPC_POLICY will be used. Values: UNDEFINED_POLICY_TYPE (0): @@ -33287,14 +38025,15 @@ class FirewallPolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicy]): A list of FirewallPolicy resources. kind (str): - [Output Only] Type of resource. Always - compute#firewallPolicyList for listsof FirewallPolicies + [Output Only] Type of resource. + Alwayscompute#firewallPolicyList for listsof + FirewallPolicies This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -33382,9 +38121,9 @@ class FirewallPolicyRule(proto.Message): This field is a member of `oneof`_ ``_enable_logging``. kind (str): - [Output only] Type of the resource. Returns - compute#firewallPolicyRule for firewall rules and - compute#packetMirroringRule for packet mirroring rules. + [Output only] Type of the resource. + Returnscompute#firewallPolicyRule for firewall rules + andcompute#packetMirroringRule for packet mirroring rules. This field is a member of `oneof`_ ``_kind``. match (google.cloud.compute_v1beta.types.FirewallPolicyRuleMatcher): @@ -33425,30 +38164,33 @@ class FirewallPolicyRule(proto.Message): A list of forwarding rules to which this rule applies. This field allows you to control which load balancers get this rule. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project - /global/forwardingRules/forwardingRule - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /forwardingRules/forwardingRule - - projects/project/global/ - forwardingRules/forwardingRule - - projects/project/regions/region/forwardingRules/ - forwardingRule + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule + - projects/project/global/ + forwardingRules/forwardingRule + - + projects/project/regions/region/forwardingRules/ + forwardingRule target_resources (MutableSequence[str]): A list of network resource URLs to which this - rule applies. This field allows you to control - which network's VMs get this rule. If this field - is left blank, all VMs within the organization - will receive the rule. + rule applies. This field allows you to control + which network's VMs get this rule. If this + field is left blank, all VMs within the + organization will receive the rule. target_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this - rule will be ignored. targetSecureTag may not be set at the - same time as targetServiceAccounts. If neither - targetServiceAccounts nor targetSecureTag are specified, the + rule will be ignored.targetSecureTag may not be set at the + same time astargetServiceAccounts. If neither + targetServiceAccounts nortargetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. target_service_accounts (MutableSequence[str]): @@ -33457,8 +38199,9 @@ class FirewallPolicyRule(proto.Message): rule. target_type (str): Target types of the firewall policy rule. - Default value is INSTANCES. Check the TargetType - enum for the list of possible values. + Default value is INSTANCES. + Check the TargetType enum for the list of + possible values. This field is a member of `oneof`_ ``_target_type``. tls_inspect (bool): @@ -33487,8 +38230,8 @@ class Direction(proto.Enum): INGRESS = 516931221 class TargetType(proto.Enum): - r"""Target types of the firewall policy rule. Default value is - INSTANCES. + r"""Target types of the firewall policy rule. + Default value is INSTANCES. Values: UNDEFINED_TARGET_TYPE (0): @@ -33608,8 +38351,9 @@ class FirewallPolicyRuleMatcher(proto.Message): Maximum number of destination fqdn allowed is 100. dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - destination CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of destination CIDR IP ranges + allowed is 5000. dest_network_scope (str): Network scope of the traffic destination. Check the DestNetworkScope enum for the list of @@ -33618,8 +38362,15 @@ class FirewallPolicyRuleMatcher(proto.Message): This field is a member of `oneof`_ ``_dest_network_scope``. dest_network_type (str): Network type of the traffic destination. Allowed values are: - - UNSPECIFIED - INTERNET - NON_INTERNET Check the - DestNetworkType enum for the list of possible values. + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Check the DestNetworkType enum for the list of possible + values. This field is a member of `oneof`_ ``_dest_network_type``. dest_region_codes (MutableSequence[str]): @@ -33645,8 +38396,9 @@ class FirewallPolicyRuleMatcher(proto.Message): should be matched against traffic source. Maximum number of source fqdn allowed is 100. src_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - source CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of source CIDR IP ranges allowed + is 5000. src_network_scope (str): Network scope of the traffic source. Check the SrcNetworkScope enum for the list of @@ -33654,10 +38406,18 @@ class FirewallPolicyRuleMatcher(proto.Message): This field is a member of `oneof`_ ``_src_network_scope``. src_network_type (str): - Network type of the traffic source. Allowed values are: - - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - - VPC_NETWORKS Check the SrcNetworkType enum for the list of - possible values. + Network type of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + + Check the SrcNetworkType enum for the list of possible + values. This field is a member of `oneof`_ ``_src_network_type``. src_networks (MutableSequence[str]): @@ -33672,8 +38432,8 @@ class FirewallPolicyRuleMatcher(proto.Message): 5000. src_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): List of secure tag values, which should be - matched at the source of the traffic. For - INGRESS rule, if all the srcSecureTag are + matched at the source of the traffic. + For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. @@ -33696,10 +38456,17 @@ class DestNetworkScope(proto.Enum): UNDEFINED_DEST_NETWORK_SCOPE = 0 class DestNetworkType(proto.Enum): - r"""Network type of the traffic destination. Allowed values are: - - UNSPECIFIED - INTERNET - NON_INTERNET Additional supported values - which may be not listed in the enum directly due to technical - reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS + r"""Network type of the traffic destination. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Additional supported values which may be not listed in the enum + directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET + UNSPECIFIED VPC_NETWORKS Values: UNDEFINED_DEST_NETWORK_TYPE (0): @@ -33721,8 +38488,16 @@ class SrcNetworkScope(proto.Enum): UNDEFINED_SRC_NETWORK_SCOPE = 0 class SrcNetworkType(proto.Enum): - r"""Network type of the traffic source. Allowed values are: - - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS + r"""Network type of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + Additional supported values which may be not listed in the enum directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS @@ -33824,8 +38599,8 @@ class FirewallPolicyRuleMatcherLayer4Config(proto.Message): The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp), or the IP + the following well known protocol strings + (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP protocol number. This field is a member of `oneof`_ ``_ip_protocol``. @@ -33833,8 +38608,10 @@ class FirewallPolicyRuleMatcherLayer4Config(proto.Message): An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. + rule applies to connections through any port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. """ ip_protocol: str = proto.Field( @@ -33908,13 +38685,18 @@ class FixedOrPercent(proto.Message): Attributes: calculated (int): [Output Only] Absolute value of VM instances calculated - based on the specific mode. - If the value is fixed, then - the calculated value is equal to the fixed value. - If the - value is a percent, then the calculated value is percent/100 - \* targetSize. For example, the calculated value of a 80% of - a managed instance group with 150 instances would be (80/100 - \* 150) = 120 VM instances. If there is a remainder, the - number is rounded. + based on the specific mode. + + :: + + - If the value is fixed, then the calculated + value is equal to the fixed value. + - If the value is a percent, then the + calculated + value is percent/100 * targetSize. For example, + the calculated value of a 80% of a managed instance group + with 150 instances would be (80/100 * 150) = 120 VM instances. If there + is a remainder, the number is rounded. This field is a member of `oneof`_ ``_calculated``. fixed (int): @@ -33950,9 +38732,10 @@ class FixedOrPercent(proto.Message): class FlexibleTimeRange(proto.Message): r"""A flexible specification of a time range that has 3 points of flexibility: (1) a flexible start time, (2) a flexible end time, - (3) a flexible duration. It is possible to specify a - contradictory time range that cannot be matched by any Interval. - This causes a validation error. + (3) a flexible duration. + + It is possible to specify a contradictory time range that cannot + be matched by any Interval. This causes a validation error. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -34011,16 +38794,21 @@ class FlexibleTimeRange(proto.Message): class ForwardingRule(proto.Message): - r"""Represents a Forwarding Rule resource. Forwarding rule resources in - Google Cloud can be either regional or global in scope: \* - `Global `__ - \* - `Regional `__ + r"""Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either regional or + global in scope: + + - `Global `__ + - `Regional `__ + A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic - gateways (targetVpnGateway). For more information, read Forwarding - rule concepts and Using protocol forwarding. + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts and Using + protocol forwarding. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -34032,37 +38820,54 @@ class ForwardingRule(proto.Message): forwarding rule directs the traffic to the referenced target or backendService. While creating a forwarding rule, specifying an IPAddress is required under the following - circumstances: - When the target is set to targetGrpcProxy - and validateForProxyless is set to true, the IPAddress - should be set to 0.0.0.0. - When the target is a Private - Service Connect Google APIs bundle, you must specify an - IPAddress. Otherwise, you can optionally specify an IP - address that references an existing static (reserved) IP - address resource. When omitted, Google Cloud assigns an - ephemeral IP address. Use one of the following formats to - specify an IP address while creating a forwarding rule: \* - IP address number, as in ``100.1.2.3`` \* IPv6 address - range, as in ``2600:1234::/96`` \* Full resource URL, as in - https://www.googleapis.com/compute/v1/projects/ - project_id/regions/region/addresses/address-name \* Partial - URL or by name, as in: - - projects/project_id/regions/region/addresses/address-name - - regions/region/addresses/address-name - - global/addresses/address-name - address-name The forwarding - rule's target or backendService, and in most cases, also the - loadBalancingScheme, determine the type of IP address that - you can use. For detailed information, see `IP address + circumstances: + + :: + + - When the target is set to targetGrpcProxy andvalidateForProxyless is set to true, theIPAddress should be set to 0.0.0.0. + - When the target is a Private Service Connect Google APIs + bundle, you must specify an IPAddress. + + Otherwise, you can optionally specify an IP address that + references an existing static (reserved) IP address + resource. When omitted, Google Cloud assigns an ephemeral IP + address. + + Use one of the following formats to specify an IP address + while creating a forwarding rule: + + - IP address number, as in ``100.1.2.3`` + + - IPv6 address range, as in ``2600:1234::/96`` + + - Full resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name + + - Partial URL or by name, as in: + + - projects/project_id/regions/region/addresses/address-name + - regions/region/addresses/address-name + - global/addresses/address-name + - address-name + + The forwarding rule's target or backendService, and in most + cases, also the loadBalancingScheme, determine the type of + IP address that you can use. For detailed information, see + `IP address specifications `__. + When reading an IPAddress, the API always returns the IP address number. This field is a member of `oneof`_ ``_I_p_address``. I_p_protocol (str): - The IP protocol to which this rule applies. For protocol - forwarding, valid options are TCP, UDP, ESP, AH, SCTP, ICMP - and L3_DEFAULT. The valid IP protocols are different for - different load balancing products as described in `Load - balancing + The IP protocol to which this rule applies. + + For protocol forwarding, valid options are TCP, UDP, ESP,AH, + SCTP, ICMP andL3_DEFAULT. + + The valid IP protocols are different for different load + balancing products as described in `Load balancing features `__. Check the IPProtocolEnum enum for the list of possible values. @@ -34072,18 +38877,21 @@ class ForwardingRule(proto.Message): The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this - forwarding rule. The allPorts field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. - It's - applicable only to the following products: internal - passthrough Network Load Balancers, backend service-based - external passthrough Network Load Balancers, and internal - and external protocol forwarding. - Set this field to true - to allow packets addressed to any port or packets lacking - destination port information (for example, UDP fragments - after the first fragment) to be forwarded to the backends - configured with this forwarding rule. The L3_DEFAULT - protocol requires allPorts be set to true. + forwarding rule. + + The allPorts field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, SCTP, or L3_DEFAULT. + - It's applicable only to the following products: internal passthrough + Network Load Balancers, backend service-based external passthrough Network + Load Balancers, and internal and external protocol forwarding. + - Set this field to true to allow packets addressed to any port or + packets lacking destination port information (for example, UDP fragments + after the first fragment) to be forwarded to the backends configured with + this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to true. This field is a member of `oneof`_ ``_all_ports``. allow_global_access (bool): @@ -34108,9 +38916,10 @@ class ForwardingRule(proto.Message): consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC - forwarding rules should not use this field. This field was - never released to any customers and is deprecated and will - be removed in the future. + forwarding rules should not use this field. + + This field was never released to any customers and is + deprecated and will be removed in the future. This field is a member of `oneof`_ ``_allow_psc_packet_injection``. backend_service (str): @@ -34131,7 +38940,7 @@ class ForwardingRule(proto.Message): This field is a member of `oneof`_ ``_base_forwarding_rule``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -34143,15 +38952,17 @@ class ForwardingRule(proto.Message): external_managed_backend_bucket_migration_state (str): Specifies the canary migration state for the backend buckets attached to this forwarding rule. Possible values are - PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin - the migration from EXTERNAL to EXTERNAL_MANAGED, the state - must be changed to PREPARE. The state must be changed to - TEST_ALL_TRAFFIC before the loadBalancingScheme can be - changed to EXTERNAL_MANAGED. Optionally, the + PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, + the state must be changed to PREPARE. The state must be + changed to TEST_ALL_TRAFFIC before the loadBalancingScheme + can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets attached to this forwarding rule by percentage using externalManagedBackendBucketMigrationTestingPercentage. + Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC @@ -34165,11 +38976,14 @@ class ForwardingRule(proto.Message): external_managed_backend_bucket_migration_testing_percentage (float): Determines the fraction of requests to backend buckets that should be processed by the global external Application Load - Balancer. The value of this field must be in the range [0, - 100]. This value can only be set if the loadBalancingScheme - in the BackendService is set to EXTERNAL (when using the - classic Application Load Balancer) and the migration state - is TEST_BY_PERCENTAGE. + Balancer. + + The value of this field must be in the range [0, 100]. + + This value can only be set if the loadBalancingScheme in the + BackendService is set to EXTERNAL (when using the classic + Application Load Balancer) and the migration state is + TEST_BY_PERCENTAGE. This field is a member of `oneof`_ ``_external_managed_backend_bucket_migration_testing_percentage``. fingerprint (str): @@ -34179,9 +38993,10 @@ class ForwardingRule(proto.Message): ignored when inserting a ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied - from another concurrent request. To see the - latest fingerprint, make a get() request to - retrieve a ForwardingRule. + from another concurrent request. + + To see the latest fingerprint, make a get() + request to retrieve a ForwardingRule. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -34192,19 +39007,23 @@ class ForwardingRule(proto.Message): ip_collection (str): Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. + Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full - resource URL, as in - https://www.googleapis.com/compute/v1/projects/project_id/regions/region - /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - - regions/region/publicDelegatedPrefixes/sub-pdp-name + resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name + Partial URL, as in: + + :: + + - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name + - regions/region/publicDelegatedPrefixes/sub-pdp-name This field is a member of `oneof`_ ``_ip_collection``. ip_version (str): The IP Version that will be used by this - forwarding rule. Valid options are IPV4 or IPV6. - Check the IpVersion enum for the list of + forwarding rule. Valid options are IPV4 or + IPV6. Check the IpVersion enum for the list of possible values. This field is a member of `oneof`_ ``_ip_version``. @@ -34213,15 +39032,15 @@ class ForwardingRule(proto.Message): can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic - mirrored even if a PacketMirroring rule applies + mirrored even if aPacketMirroring rule applies to them. This can only be set to true for load - balancers that have their loadBalancingScheme - set to INTERNAL. + balancers that have theirloadBalancingScheme set + to INTERNAL. This field is a member of `oneof`_ ``_is_mirroring_collector``. kind (str): - [Output Only] Type of the resource. Always - compute#forwardingRule for forwarding rule resources. + [Output Only] Type of the resource. + Alwayscompute#forwardingRule for forwarding rule resources. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -34233,22 +39052,24 @@ class ForwardingRule(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a ForwardingRule. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a ForwardingRule. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. load_balancing_scheme (str): - Specifies the forwarding rule type. For more - information about forwarding rules, refer to - Forwarding rule concepts. Check the - LoadBalancingScheme enum for the list of - possible values. + Specifies the forwarding rule type. + + For more information about forwarding rules, + refer to Forwarding rule concepts. + Check the LoadBalancingScheme enum for the list + of possible values. This field is a member of `oneof`_ ``_load_balancing_scheme``. metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): @@ -34257,30 +39078,34 @@ class ForwardingRule(proto.Message): clients. In their xDS requests to load balancer, xDS clients present node metadata. When there is a match, the relevant configuration is made available to those proxies. Otherwise, - all the resources (e.g. TargetHttpProxy, UrlMap) referenced - by the ForwardingRule are not visible to those proxies. For - each metadataFilter in this list, if its filterMatchCriteria - is set to MATCH_ANY, at least one of the filterLabels must - match the corresponding label provided in the metadata. If - its filterMatchCriteria is set to MATCH_ALL, then all of its - filterLabels must match with corresponding labels provided - in the metadata. If multiple metadataFilters are specified, - all of them need to be satisfied in order to be considered a - match. metadataFilters specified here will be applifed - before those specified in the UrlMap that this - ForwardingRule references. metadataFilters only applies to - Loadbalancers that have their loadBalancingScheme set to - INTERNAL_SELF_MANAGED. + all the resources (e.g.TargetHttpProxy, UrlMap) referenced + by the ForwardingRule are not visible to those proxies. + + For each metadataFilter in this list, if + itsfilterMatchCriteria is set to MATCH_ANY, at least one of + thefilterLabels must match the corresponding label provided + in the metadata. If its filterMatchCriteria is set to + MATCH_ALL, then all of its filterLabels must match with + corresponding labels provided in the metadata. If + multiplemetadataFilters are specified, all of them need to + be satisfied in order to be considered a match. + + metadataFilters specified here will be applifed before those + specified in the UrlMap that thisForwardingRule references. + + metadataFilters only applies to Loadbalancers that have + their loadBalancingScheme set toINTERNAL_SELF_MANAGED. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. For - Private Service Connect forwarding rules that forward + except the last character, which cannot be a dash. + + For Private Service Connect forwarding rules that forward traffic to Google APIs, the forwarding rule name must be a 1-20 characters string with lowercase letters and numbers and must start with a letter. @@ -34288,30 +39113,36 @@ class ForwardingRule(proto.Message): This field is a member of `oneof`_ ``_name``. network (str): This field is not used for global external - load balancing. For internal passthrough Network - Load Balancers, this field identifies the - network that the load balanced IP should belong - to for this forwarding rule. If the subnetwork - is specified, the network of the subnetwork will - be used. If neither subnetwork nor this field is - specified, the default network will be used. For - Private Service Connect forwarding rules that - forward traffic to Google APIs, a network must - be provided. + load balancing. + For internal passthrough Network Load Balancers, + this field identifies the network that the load + balanced IP should belong to for this forwarding + rule. + If the subnetwork is specified, the network of + the subnetwork will be used. If neither + subnetwork nor this field is specified, the + default network will be used. + + For Private Service Connect forwarding rules + that forward traffic to Google APIs, a network + must be provided. This field is a member of `oneof`_ ``_network``. network_tier (str): This signifies the networking tier used for configuring this load balancer and can only take - the following values: PREMIUM, STANDARD. For - regional ForwardingRule, the valid values are - PREMIUM and STANDARD. For GlobalForwardingRule, - the valid value is PREMIUM. If this field is not - specified, it is assumed to be PREMIUM. If - IPAddress is specified, this value must be equal - to the networkTier of the Address. Check the - NetworkTier enum for the list of possible - values. + the following values:PREMIUM, STANDARD. + + For regional ForwardingRule, the valid values + are PREMIUM andSTANDARD. For + GlobalForwardingRule, the valid value isPREMIUM. + + If this field is not specified, it is assumed to + be PREMIUM. If IPAddress is specified, this + value must be equal to the networkTier of the + Address. + Check the NetworkTier enum for the list of + possible values. This field is a member of `oneof`_ ``_network_tier``. no_automate_dns_zone (bool): @@ -34326,42 +39157,59 @@ class ForwardingRule(proto.Message): The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this - forwarding rule. The portRange field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, or SCTP, and - It's applicable only - to the following products: external passthrough Network Load - Balancers, internal and external proxy Network Load - Balancers, internal and external Application Load Balancers, - external protocol forwarding, and Classic VPN. - Some - products have restrictions on what ports can be used. See - port specifications for details. For external forwarding - rules, two or more forwarding rules cannot use the same - [IPAddress, IPProtocol] pair, and cannot have overlapping - portRanges. For internal forwarding rules within the same - VPC network, two or more forwarding rules cannot use the - same [IPAddress, IPProtocol] pair, and cannot have - overlapping portRanges. @pattern: \\d+(?:-\\d+)? + forwarding rule. + + The portRange field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, or SCTP, and + - It's applicable only to the following products: external passthrough + Network Load Balancers, internal and external proxy Network Load Balancers, + internal and external Application Load Balancers, external protocol + forwarding, and Classic VPN. + - Some products have restrictions on what ports can be used. See + port specifications for details. + + For external forwarding rules, two or more forwarding rules + cannot use the same [IPAddress, IPProtocol] pair, and cannot + have overlappingportRanges. + + For internal forwarding rules within the same VPC network, + two or more forwarding rules cannot use the same [IPAddress, + IPProtocol] pair, and cannot have overlapping portRanges. + + @pattern: \\d+(?:-\\d+)? This field is a member of `oneof`_ ``_port_range``. ports (MutableSequence[str]): The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this - forwarding rule. The ports field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, or SCTP, and - It's applicable only - to the following products: internal passthrough Network Load - Balancers, backend service-based external passthrough - Network Load Balancers, and internal protocol forwarding. - - You can specify a list of up to five ports by number, - separated by commas. The ports can be contiguous or - discontiguous. For external forwarding rules, two or more - forwarding rules cannot use the same [IPAddress, IPProtocol] - pair if they share at least one port number. For internal - forwarding rules within the same VPC network, two or more - forwarding rules cannot use the same [IPAddress, IPProtocol] - pair if they share at least one port number. @pattern: - \\d+(?:-\\d+)? + forwarding rule. + + The ports field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, or SCTP, and + - It's applicable only to the following products: internal passthrough + Network Load Balancers, backend service-based external passthrough Network + Load Balancers, and internal protocol forwarding. + - You can specify a list of up to five ports by number, separated by + commas. The ports can be contiguous or discontiguous. + + For external forwarding rules, two or more forwarding rules + cannot use the same [IPAddress, IPProtocol] pair if they + share at least one port number. + + For internal forwarding rules within the same VPC network, + two or more forwarding rules cannot use the same [IPAddress, + IPProtocol] pair if they share at least one port number. + + @pattern: \\d+(?:-\\d+)? psc_connection_id (int): [Output Only] The PSC connection id of the PSC forwarding rule. @@ -34396,20 +39244,24 @@ class ForwardingRule(proto.Message): service_label (str): An optional prefix to the service name for this forwarding rule. If specified, the prefix is the first label of the - fully qualified service name. The label must be 1-63 - characters long, and comply with RFC1035. Specifically, the - label must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. + fully qualified service name. + + The label must be 1-63 characters long, and comply + withRFC1035. Specifically, the label must be 1-63 characters + long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + This field is only used for internal load balancing. This field is a member of `oneof`_ ``_service_label``. service_name (str): [Output Only] The internal fully qualified service name for - this forwarding rule. This field is only used for internal - load balancing. + this forwarding rule. + + This field is only used for internal load balancing. This field is a member of `oneof`_ ``_service_name``. source_ip_ranges (MutableSequence[str]): @@ -34418,7 +39270,7 @@ class ForwardingRule(proto.Message): addresses or CIDR ranges set here. Note that a forwarding rule can only have up to 64 source IP ranges, and this field can only be used with a regional forwarding rule whose - scheme is EXTERNAL. Each source_ip_range entry should be + scheme isEXTERNAL. Each source_ip_range entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24). subnetwork (str): @@ -34426,11 +39278,13 @@ class ForwardingRule(proto.Message): load balanced IP should belong to for this forwarding rule, used with internal load balancers and external passthrough Network Load - Balancers with IPv6. If the network specified is - in auto subnet mode, this field is optional. - However, a subnetwork must be specified if the - network is in custom subnet mode or when - creating external forwarding rule with IPv6. + Balancers with IPv6. + + If the network specified is in auto subnet mode, + this field is optional. However, a subnetwork + must be specified if the network is in custom + subnet mode or when creating external forwarding + rule with IPv6. This field is a member of `oneof`_ ``_subnetwork``. target (str): @@ -34438,18 +39292,22 @@ class ForwardingRule(proto.Message): traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load - balancing resource. The forwarded traffic must be of a type - appropriate to the target object. - For load balancers, see - the "Target" column in `Port - specifications `__. - - For Private Service Connect forwarding rules that forward - traffic to Google APIs, provide the name of a supported - Google API bundle: - vpc-sc - APIs that support VPC Service - Controls. - all-apis - All supported Google APIs. - For - Private Service Connect forwarding rules that forward - traffic to managed services, the target must be a service - attachment. The target is not mutable once set as a service - attachment. + balancing resource. + + The forwarded traffic must be of a type appropriate to the + target object. + + :: + + - For load balancers, see the "Target" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). + - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: + + + - vpc-sc - APIs that support VPC Service Controls. + - all-apis - All supported Google APIs. + + + - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment. This field is a member of `oneof`_ ``_target``. """ @@ -34457,19 +39315,22 @@ class ForwardingRule(proto.Message): class ExternalManagedBackendBucketMigrationState(proto.Enum): r"""Specifies the canary migration state for the backend buckets attached to this forwarding rule. Possible values are PREPARE, - TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration - from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to - PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the - loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate traffic to - backend buckets attached to this forwarding rule by percentage using - externalManagedBackendBucketMigrationTestingPercentage. Rolling back - a migration requires the states to be set in reverse order. So - changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the - state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate some traffic - back to EXTERNAL or PREPARE can be used to migrate all traffic back - to EXTERNAL. + TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state + must be changed to PREPARE. The state must be changed to + TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to + EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be + used to migrate traffic to backend buckets attached to this + forwarding rule by percentage using + externalManagedBackendBucketMigrationTestingPercentage. + + Rolling back a migration requires the states to be set in reverse + order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL + requires the state to be set to TEST_ALL_TRAFFIC at the same time. + Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some + traffic back to EXTERNAL or PREPARE can be used to migrate all + traffic back to EXTERNAL. Values: UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE (0): @@ -34488,9 +39349,12 @@ class ExternalManagedBackendBucketMigrationState(proto.Enum): TEST_BY_PERCENTAGE = 513738389 class IPProtocolEnum(proto.Enum): - r"""The IP protocol to which this rule applies. For protocol forwarding, - valid options are TCP, UDP, ESP, AH, SCTP, ICMP and L3_DEFAULT. The - valid IP protocols are different for different load balancing + r"""The IP protocol to which this rule applies. + + For protocol forwarding, valid options are TCP, UDP, ESP,AH, SCTP, + ICMP andL3_DEFAULT. + + The valid IP protocols are different for different load balancing products as described in `Load balancing features `__. @@ -34543,8 +39407,10 @@ class IpVersion(proto.Enum): UNSPECIFIED_VERSION = 21850000 class LoadBalancingScheme(proto.Enum): - r"""Specifies the forwarding rule type. For more information - about forwarding rules, refer to Forwarding rule concepts. + r"""Specifies the forwarding rule type. + + For more information about forwarding rules, refer to Forwarding + rule concepts. Values: UNDEFINED_LOAD_BALANCING_SCHEME (0): @@ -34572,13 +39438,17 @@ class LoadBalancingScheme(proto.Enum): INVALID = 530283991 class NetworkTier(proto.Enum): - r"""This signifies the networking tier used for configuring this - load balancer and can only take the following values: PREMIUM, - STANDARD. For regional ForwardingRule, the valid values are - PREMIUM and STANDARD. For GlobalForwardingRule, the valid value - is PREMIUM. If this field is not specified, it is assumed to be - PREMIUM. If IPAddress is specified, this value must be equal to - the networkTier of the Address. + r"""This signifies the networking tier used for configuring + this load balancer and can only take the following + values:PREMIUM, STANDARD. + + For regional ForwardingRule, the valid values are PREMIUM + andSTANDARD. For GlobalForwardingRule, the valid value + isPREMIUM. + + If this field is not specified, it is assumed to be PREMIUM. If + IPAddress is specified, this value must be equal to the + networkTier of the Address. Values: UNDEFINED_NETWORK_TIER (0): @@ -34850,15 +39720,15 @@ class ForwardingRuleAggregatedList(proto.Message): A list of ForwardingRulesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#forwardingRuleAggregatedList for lists of forwarding - rules. + [Output Only] Type of resource. + Alwayscompute#forwardingRuleAggregatedList for lists of + forwarding rules. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -34938,7 +39808,7 @@ class ForwardingRuleList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -35131,7 +40001,7 @@ class FutureReservation(proto.Message): This field is a member of `oneof`_ ``_commitment_info``. creation_timestamp (str): [Output Only] The creation timestamp for this future - reservation in RFC3339 text format. + reservation inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deployment_type (str): @@ -35157,14 +40027,14 @@ class FutureReservation(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#futureReservation for future reservations. + [Output Only] Type of the resource. + Alwayscompute#futureReservation for future reservations. This field is a member of `oneof`_ ``_kind``. name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -35537,17 +40407,17 @@ class FutureReservationCommitmentInfo(proto.Message): Only applicable if FR is delivering to the same reservation. If set, all parent commitments will be extended to match the end date of the - plan for this commitment. Check the - PreviousCommitmentTerms enum for the list of - possible values. + plan for this commitment. + Check the PreviousCommitmentTerms enum for the + list of possible values. This field is a member of `oneof`_ ``_previous_commitment_terms``. """ class CommitmentPlan(proto.Enum): r"""Indicates if a Commitment needs to be created as part of FR - delivery. If this field is not present, then no commitment needs - to be created. + delivery. If this field is not present, then no + commitment needs to be created. Values: UNDEFINED_COMMITMENT_PLAN (0): @@ -36133,15 +41003,15 @@ class FutureReservationsAggregatedListResponse(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.FutureReservationsScopedList]): A list of Future reservation resources. kind (str): - [Output Only] Type of resource. Always - compute#futureReservationsAggregatedListResponse for future - resevation aggregated list response. + [Output Only] Type of resource. + Alwayscompute#futureReservationsAggregatedListResponse for + future resevation aggregated list response. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -36223,15 +41093,15 @@ class FutureReservationsListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.FutureReservation]): [Output Only] A list of future reservation resources. kind (str): - [Output Only] Type of resource.Always - compute#FutureReservationsListResponse for lists of - reservations + [Output Only] Type of + resource.Alwayscompute#FutureReservationsListResponse for + lists of reservations This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -36416,8 +41286,8 @@ class RecommendationType(proto.Enum): class FutureResourcesRecommendationOtherLocation(proto.Message): - r"""Information about recommendation status for locations that - were allowed but not used by the response. + r"""Information about recommendation status for locations + that were allowed but not used by the response. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -36616,6 +41486,8 @@ class VmFamily(proto.Enum): No description available. VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X (485271888): + No description available. """ UNDEFINED_VM_FAMILY = 0 VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 @@ -36625,6 +41497,7 @@ class VmFamily(proto.Enum): VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X = 485271888 class WorkloadType(proto.Enum): r"""Workload type. Use for TPU reservations. @@ -36715,9 +41588,10 @@ class FutureResourcesSpecLocationPolicy(proto.Message): Attributes: locations (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesSpecLocationPolicyLocation]): - Preferences for specified locations. Keys of - the map are locations - zones, in format of - 'zones/'. Values are preferences for the zones. + Preferences for specified locations. + Keys of the map are locations - zones, in format + of 'zones/'. Values are preferences for the + zones. If a zone is not specified in this map, it is ALLOWed. """ @@ -36854,11 +41728,15 @@ class GRPCHealthCheck(proto.Message): grpc_service_name (str): The gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following - meanings by convention: - Empty service_name means the - overall status of all services at the backend. - Non-empty - service_name means the health of that gRPC service, as - defined by the owner of the service. The grpc_service_name - can only be ASCII. + meanings by convention: + + - Empty service_name means the overall status of all + services at the backend. + + - Non-empty service_name means the health of that gRPC + service, as defined by the owner of the service. + + The grpc_service_name can only be ASCII. This field is a member of `oneof`_ ``_grpc_service_name``. port (int): @@ -36874,7 +41752,7 @@ class GRPCHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -36887,14 +41765,16 @@ class GRPCHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -36903,7 +41783,7 @@ class GRPCHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -36915,13 +41795,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -36978,11 +41859,15 @@ class GRPCTLSHealthCheck(proto.Message): grpc_service_name (str): The gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following - meanings by convention: - Empty service_name means the - overall status of all services at the backend. - Non-empty - service_name means the health of that gRPC service, as - defined by the owner of the service. The grpc_service_name - can only be ASCII. + meanings by convention: + + - Empty service_name means the overall status of all + services at the backend. + + - Non-empty service_name means the health of that gRPC + service, as defined by the owner of the service. + + The grpc_service_name can only be ASCII. This field is a member of `oneof`_ ``_grpc_service_name``. port (int): @@ -36994,7 +41879,7 @@ class GRPCTLSHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -37007,14 +41892,16 @@ class GRPCTLSHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -37023,7 +41910,7 @@ class GRPCTLSHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -37035,13 +41922,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -37342,6 +42230,37 @@ class GetAutoscalerRequest(proto.Message): ) +class GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. See the + method description for details. + + Attributes: + project (str): + Required. Project ID for this request. + resource_id (str): + Required. The name of the managed instance + group. It should conform to RFC1035. + zone (str): + Required. The name of thezone where the + managed instance group is located. + Name should conform to RFC1035. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource_id: str = proto.Field( + proto.STRING, + number=160795372, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class GetBackendBucketRequest(proto.Message): r"""A request message for BackendBuckets.Get. See the method description for details. @@ -37882,6 +42801,28 @@ class GetGlobalPublicDelegatedPrefixeRequest(proto.Message): ) +class GetGlobalVmExtensionPolicyRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.Get. See the + method description for details. + + Attributes: + global_vm_extension_policy (str): + Name of the GlobalVmExtensionPolicy resource + to return. + project (str): + Project ID for this request. + """ + + global_vm_extension_policy: str = proto.Field( + proto.STRING, + number=8334110, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + class GetGuestAttributesInstanceRequest(proto.Message): r"""A request message for Instances.GetGuestAttributes. See the method description for details. @@ -38611,6 +43552,45 @@ class GetIamPolicyNodeTemplateRequest(proto.Message): ) +class GetIamPolicyRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + class GetIamPolicyRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.GetIamPolicy. See the method description for details. @@ -38650,8 +43630,165 @@ class GetIamPolicyRegionBackendServiceRequest(proto.Message): ) -class GetIamPolicyRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.GetIamPolicy. See the +class GetIamPolicyRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionInstantSnapshotRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.GetIamPolicy. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.GetIamPolicy. See the method description for details. @@ -38662,12 +43799,15 @@ class GetIamPolicyRegionDiskRequest(proto.Message): Requested IAM Policy version. This field is a member of `oneof`_ ``_options_requested_policy_version``. + parent_resource (str): + Name or id of parent resource of the resource + for this request. project (str): Project ID for this request. - region (str): - The name of the region for this request. resource (str): Name or id of the resource for this request. + zone (str): + The name of the zone for this request. """ options_requested_policy_version: int = proto.Field( @@ -38675,101 +43815,26 @@ class GetIamPolicyRegionDiskRequest(proto.Message): number=499220029, optional=True, ) - project: str = proto.Field( + parent_resource: str = proto.Field( proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) - - -class GetIamPolicyRegionInstantSnapshotRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.GetIamPolicy. - See the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, + number=18091011, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) resource: str = proto.Field( proto.STRING, number=195806222, ) - - -class GetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.GetIamPolicy. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=195806222, + number=3744684, ) -class GetIamPolicyRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.GetIamPolicy. See the +class GetIamPolicyReservationRequest(proto.Message): + r"""A request message for Reservations.GetIamPolicy. See the method description for details. @@ -38782,10 +43847,10 @@ class GetIamPolicyRegionSnapshotRequest(proto.Message): This field is a member of `oneof`_ ``_options_requested_policy_version``. project (str): Project ID for this request. - region (str): - The name of the region for this request. resource (str): Name or id of the resource for this request. + zone (str): + The name of the zone for this request. """ options_requested_policy_version: int = proto.Field( @@ -38797,19 +43862,19 @@ class GetIamPolicyRegionSnapshotRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) resource: str = proto.Field( proto.STRING, number=195806222, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class GetIamPolicyReservationRequest(proto.Message): - r"""A request message for Reservations.GetIamPolicy. See the - method description for details. +class GetIamPolicyReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.GetIamPolicy. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -38819,6 +43884,9 @@ class GetIamPolicyReservationRequest(proto.Message): Requested IAM Policy version. This field is a member of `oneof`_ ``_options_requested_policy_version``. + parent_resource (str): + Name or id of parent resource of the resource + for this request. project (str): Project ID for this request. resource (str): @@ -38832,6 +43900,10 @@ class GetIamPolicyReservationRequest(proto.Message): number=499220029, optional=True, ) + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -39093,7 +44165,7 @@ class GetInstanceGroupManagerRequest(proto.Message): project (str): Project ID for this request. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -39117,13 +44189,15 @@ class GetInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. resize_request (str): - The name of the resize request. Name should - conform to RFC1035 or be a resource ID. + The name of the resize request. + Name should conform to RFC1035 or be a resource + ID. zone (str): Name of the href="/compute/docs/regions-zones/#available">zone @@ -39159,8 +44233,8 @@ class GetInstanceGroupRequest(proto.Message): project (str): Project ID for this request. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -39648,42 +44722,69 @@ class GetNatMappingInfoRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -39705,13 +44806,17 @@ class GetNatMappingInfoRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -39728,10 +44833,11 @@ class GetNatMappingInfoRoutersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -39851,9 +44957,9 @@ class GetNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ network_endpoint_group: str = proto.Field( @@ -40321,6 +45427,33 @@ class GetRegionAutoscalerRequest(proto.Message): ) +class GetRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Get. See the + method description for details. + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + class GetRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.Get. See the method description for details. @@ -40376,6 +45509,34 @@ class GetRegionCommitmentRequest(proto.Message): ) +class GetRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Get. See + the method description for details. + + Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + class GetRegionDiskRequest(proto.Message): r"""A request message for RegionDisks.Get. See the method description for details. @@ -40452,6 +45613,34 @@ class GetRegionDiskTypeRequest(proto.Message): ) +class GetRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Get. + See the method description for details. + + Attributes: + health_aggregation_policy (str): + Name of the HealthAggregationPolicy resource + to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + class GetRegionHealthCheckRequest(proto.Message): r"""A request message for RegionHealthChecks.Get. See the method description for details. @@ -40569,16 +45758,19 @@ class GetRegionInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. region (str): - The name of the region scoping this request. - Name should conform to RFC1035. + The name of the region + scoping this request. Name should conform to + RFC1035. resize_request (str): - The name of the resize request. Name should - conform to RFC1035 or be a resource ID. + The name of the resize request. + Name should conform to RFC1035 or be a resource + ID. """ instance_group_manager: str = proto.Field( @@ -40754,9 +45946,9 @@ class GetRegionNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. """ network_endpoint_group: str = proto.Field( @@ -41159,11 +46351,13 @@ class GetReservationBlockRequest(proto.Message): project (str): Project ID for this request. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. reservation_block (str): - The name of the reservation block. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation block. + Name should conform to RFC1035 or be a resource + ID. view (str): View of the Block. Check the View enum for the list of possible @@ -41250,6 +46444,9 @@ class GetReservationSubBlockRequest(proto.Message): r"""A request message for ReservationSubBlocks.Get. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: parent_name (str): The name of the parent reservation and parent block. In the @@ -41258,13 +46455,41 @@ class GetReservationSubBlockRequest(proto.Message): project (str): Project ID for this request. reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. + view (str): + View of the subBlock. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. zone (str): Name of the zone for this request. Zone name should conform to RFC1035. """ + class View(proto.Enum): + r"""View of the subBlock. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + SUB_BLOCK_VIEW_BASIC (236009797): + This view includes basic information about + the reservation sub block + SUB_BLOCK_VIEW_FULL (440711800): + Includes detailed topology view. + SUB_BLOCK_VIEW_UNSPECIFIED (246642446): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + SUB_BLOCK_VIEW_BASIC = 236009797 + SUB_BLOCK_VIEW_FULL = 440711800 + SUB_BLOCK_VIEW_UNSPECIFIED = 246642446 + parent_name: str = proto.Field( proto.STRING, number=478151936, @@ -41277,6 +46502,11 @@ class GetReservationSubBlockRequest(proto.Message): proto.STRING, number=22750491, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, @@ -41705,21 +46935,23 @@ class GetSerialPortOutputInstanceRequest(proto.Message): start (int): Specifies the starting byte position of the output to return. To start with the first byte of output to the - specified port, omit this field or set it to ``0``. If the - output for that byte position is available, this field - matches the ``start`` parameter sent with the request. If - the amount of serial console output exceeds the size of the - buffer (1 MB), the oldest output is discarded and is no + specified port, omit this field or set it to ``0``. + + If the output for that byte position is available, this + field matches the ``start`` parameter sent with the request. + If the amount of serial console output exceeds the size of + the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start - position is returned as the ``start`` property value. You - can also provide a negative start position, which translates - to the most recent number of bytes written to the serial - port. For example, -3 is interpreted as the most recent 3 - bytes written to the serial console. Note that the negative - start is bounded by the retained buffer size, and the - returned serial console output will not exceed the max + position is returned as the ``start`` property value. + + You can also provide a negative start position, which + translates to the most recent number of bytes written to the + serial port. For example, -3 is interpreted as the most + recent 3 bytes written to the serial console. Note that the + negative start is bounded by the retained buffer size, and + the returned serial console output will not exceed the max buffer size. This field is a member of `oneof`_ ``_start``. @@ -42025,17 +47257,26 @@ class GetSubnetworkRequest(proto.Message): Name of the Subnetwork resource to return. views (str): Defines the extra views returned back in the subnetwork - resource. Supported values: - WITH_UTILIZATION: Utilization - data is included in the response. Check the Views enum for - the list of possible values. + resource. Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Check the Views enum for the list of possible values. This field is a member of `oneof`_ ``_views``. """ class Views(proto.Enum): r"""Defines the extra views returned back in the subnetwork resource. - Supported values: - WITH_UTILIZATION: Utilization data is included - in the response. + Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. Values: UNDEFINED_VIEWS (0): @@ -42434,42 +47675,69 @@ class GetXpnResourcesProjectsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -42484,13 +47752,17 @@ class GetXpnResourcesProjectsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -42505,10 +47777,11 @@ class GetXpnResourcesProjectsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -42594,6 +47867,34 @@ class GetZoneRequest(proto.Message): ) +class GetZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + vm_extension_policy (str): + Name of the VM extension policy resource to + return. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + vm_extension_policy: str = proto.Field( + proto.STRING, + number=331532730, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class GlobalAddressesMoveRequest(proto.Message): r""" @@ -42609,13 +47910,16 @@ class GlobalAddressesMoveRequest(proto.Message): The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a - address: - - https://www.googleapis.com/compute/v1/projects/project - /global/addresses/address - - projects/project/global/addresses/address Note - that destination project must be different from - the source project. So /global/addresses/address - is not valid partial url. + address: + + - + https://www.googleapis.com/compute/v1/projects/project/global/addresses/address + - projects/project/global/addresses/address + + Note that destination project must be different + from the source project. + So/global/addresses/address is not valid partial + url. This field is a member of `oneof`_ ``_destination_address``. """ @@ -42720,17 +48024,17 @@ class GlobalSetLabelsRequest(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail - with error 412 conditionNotMet. Make a get() + with error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): A list of labels to apply for this resource. - Each label must comply with the requirements for - labels. For example, "webserver-frontend": - "images". A label value can also be empty (e.g. - "my-label": ""). + Each label must comply with the + requirements for labels. For + example,"webserver-frontend": "images". A label + value can also be empty (e.g. "my-label": ""). """ label_fingerprint: str = proto.Field( @@ -42789,6 +48093,474 @@ class GlobalSetPolicyRequest(proto.Message): ) +class GlobalVmExtensionPolicy(proto.Message): + r"""Message describing GlobalVmExtensionPolicy object. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + extension_policies (MutableMapping[str, google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyExtensionPolicy]): + Required. Map from extension (eg: "cloudops") + to its policy configuration. The key is the name + of the extension. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + instance_selectors (MutableSequence[google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyInstanceSelector]): + Optional. Selector to target VMs for a policy. There is a + logical "AND" between instance_selectors. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#globalVmExtensionPolicy for + globalVmExtensionPolicies. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + priority (int): + Optional. Used to resolve conflicts when + multiple policies are active for the same + extension. Defaults to 0. + + Larger the number, higher the priority. When the + priority is the same, the policy with the newer + create time has higher priority. + + This field is a member of `oneof`_ ``_priority``. + rollout_operation (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperation): + Required. The rollout strategy and status. + + This field is a member of `oneof`_ ``_rollout_operation``. + scoped_resource_status (str): + [Output Only] The scoped resource status. It's only for + tracking the purging status of the policy. Check the + ScopedResourceStatus enum for the list of possible values. + + This field is a member of `oneof`_ ``_scoped_resource_status``. + self_link (str): + [Output Only] Server-defined fully-qualified URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL for this resource's + resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + update_timestamp (str): + [Output Only] Update timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_update_timestamp``. + """ + + class ScopedResourceStatus(proto.Enum): + r"""[Output Only] The scoped resource status. It's only for tracking the + purging status of the policy. + + Values: + UNDEFINED_SCOPED_RESOURCE_STATUS (0): + A value indicating that the enum field is not + set. + SCOPED_RESOURCE_STATUS_DELETING (404198387): + The zonal policies are being deleted. + SCOPED_RESOURCE_STATUS_UNSPECIFIED (437941996): + Default value. This value is unused. + """ + UNDEFINED_SCOPED_RESOURCE_STATUS = 0 + SCOPED_RESOURCE_STATUS_DELETING = 404198387 + SCOPED_RESOURCE_STATUS_UNSPECIFIED = 437941996 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + extension_policies: MutableMapping[ + str, "GlobalVmExtensionPolicyExtensionPolicy" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=227761488, + message="GlobalVmExtensionPolicyExtensionPolicy", + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + instance_selectors: MutableSequence[ + "GlobalVmExtensionPolicyInstanceSelector" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520298826, + message="GlobalVmExtensionPolicyInstanceSelector", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + rollout_operation: "GlobalVmExtensionPolicyRolloutOperation" = proto.Field( + proto.MESSAGE, + number=486746201, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperation", + ) + scoped_resource_status: str = proto.Field( + proto.STRING, + number=181976980, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + update_timestamp: str = proto.Field( + proto.STRING, + number=120894752, + optional=True, + ) + + +class GlobalVmExtensionPolicyExtensionPolicy(proto.Message): + r"""Policy for a single extension. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pinned_version (str): + Optional. The version pinning for the + extension. If empty, the extension will be + installed with the latest version released by + the extension producer. + + This field is a member of `oneof`_ ``_pinned_version``. + string_config (str): + Optional. String configuration. Any string + payload that the extension understands. + + This field is a member of `oneof`_ ``_string_config``. + """ + + pinned_version: str = proto.Field( + proto.STRING, + number=446267249, + optional=True, + ) + string_config: str = proto.Field( + proto.STRING, + number=318905136, + optional=True, + ) + + +class GlobalVmExtensionPolicyInstanceSelector(proto.Message): + r"""Selector to target VMs for a zone VM extension policy. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + label_selector (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyLabelSelector): + Optional. Labels within the LabelSelector are + OR'd. + + This field is a member of `oneof`_ ``_label_selector``. + """ + + label_selector: "GlobalVmExtensionPolicyLabelSelector" = proto.Field( + proto.MESSAGE, + number=349780170, + optional=True, + message="GlobalVmExtensionPolicyLabelSelector", + ) + + +class GlobalVmExtensionPolicyLabelSelector(proto.Message): + r"""A LabelSelector is applicable for a VM only if it matches all + labels in the LabelSelector. + + Attributes: + inclusion_labels (MutableMapping[str, str]): + Optional. Labels as key value pairs. + A VM should contain all the pairs specified in + this map to be selected; Labels within the + LabelSelector are OR'ed. + """ + + inclusion_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=501312642, + ) + + +class GlobalVmExtensionPolicyRolloutOperation(proto.Message): + r"""Represents the rollout operation + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rollout_input (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput): + Required. The rollout input which defines the + rollout plan. + + This field is a member of `oneof`_ ``_rollout_input``. + rollout_status (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatus): + [Output Only] The rollout status of the policy. + + This field is a member of `oneof`_ ``_rollout_status``. + """ + + rollout_input: "GlobalVmExtensionPolicyRolloutOperationRolloutInput" = proto.Field( + proto.MESSAGE, + number=265745340, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutInput", + ) + rollout_status: "GlobalVmExtensionPolicyRolloutOperationRolloutStatus" = ( + proto.Field( + proto.MESSAGE, + number=476426816, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + ) + ) + + +class GlobalVmExtensionPolicyRolloutOperationRolloutInput(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + conflict_behavior (str): + Optional. [Optional] Specifies the behavior of the Rollout + if a conflict is detected in a project during a Rollout. It + can be one of the following values: + + 1) empty : don't overwrite the local value if conflict + happens. This is the default behavior. + 2) "overwrite" : Overwrite the local value with the rollout + value. The concept of "conflict" applies to: + 3) Insert action. If the zonal policy already exists when + Insert happens, it's a conflict. + 4) Update action. If the zonal policy was updated out of + band by a zonal API, it's a conflict. + + This field is a member of `oneof`_ ``_conflict_behavior``. + name (str): + Optional. The name of the rollout plan. + Ex. + projects//locations/global/rolloutPlans/. + + This field is a member of `oneof`_ ``_name``. + predefined_rollout_plan (str): + Optional. Predefined rollout plan. + Check the PredefinedRolloutPlan enum for the + list of possible values. + + This field is a member of `oneof`_ ``_predefined_rollout_plan``. + retry_uuid (str): + Optional. The UUID of the retry action. Only set it if this + is a retry for an existing resource. This is for the user + re-populate the resource without changes. An error will be + returned if the retry_uuid is set but the resource get + modified. + + This field is a member of `oneof`_ ``_retry_uuid``. + """ + + class PredefinedRolloutPlan(proto.Enum): + r"""Optional. Predefined rollout plan. + + Values: + UNDEFINED_PREDEFINED_ROLLOUT_PLAN (0): + A value indicating that the enum field is not + set. + FAST_ROLLOUT (207153326): + No description available. + ROLLOUT_PLAN_UNSPECIFIED (144511983): + No description available. + SLOW_ROLLOUT (31032659): + No description available. + """ + UNDEFINED_PREDEFINED_ROLLOUT_PLAN = 0 + FAST_ROLLOUT = 207153326 + ROLLOUT_PLAN_UNSPECIFIED = 144511983 + SLOW_ROLLOUT = 31032659 + + conflict_behavior: str = proto.Field( + proto.STRING, + number=115729439, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + predefined_rollout_plan: str = proto.Field( + proto.STRING, + number=364023440, + optional=True, + ) + retry_uuid: str = proto.Field( + proto.STRING, + number=472838898, + optional=True, + ) + + +class GlobalVmExtensionPolicyRolloutOperationRolloutStatus(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + current_rollouts (MutableSequence[google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata]): + [Output Only] The current rollouts for the latest version of + the resource. There should be only one current rollout, but + for scalability, we make it repeated. + previous_rollout (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata): + [Output Only] The last completed rollout resource. This + field will not be populated until the first rollout is + completed. + + This field is a member of `oneof`_ ``_previous_rollout``. + """ + + current_rollouts: MutableSequence[ + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" + ] = proto.RepeatedField( + proto.MESSAGE, + number=39829736, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", + ) + previous_rollout: "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" = proto.Field( + proto.MESSAGE, + number=375749737, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", + ) + + +class GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata( + proto.Message +): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rollout (str): + [Output Only] The name of the rollout. Ex. + projects//locations/global/rollouts/. + + This field is a member of `oneof`_ ``_rollout``. + rollout_plan (str): + [Output Only] The name of the rollout plan. Ex. + projects//locations/global/rolloutPlans/. + + This field is a member of `oneof`_ ``_rollout_plan``. + state (str): + [Output Only] The overall state of the rollout. Check the + State enum for the list of possible values. + + This field is a member of `oneof`_ ``_state``. + """ + + class State(proto.Enum): + r"""[Output Only] The overall state of the rollout. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + STATE_CANCELLED (534636259): + Iteration was explicitly cancelled. + STATE_COMPLETED (265728989): + Iteration completed, with all actions being + successful. + STATE_FAILED (50857931): + Iteration completed, with failures. + STATE_PAUSED (337513660): + The rollout is paused. + STATE_PROCESSING (74195873): + Iteration is in progress. + STATE_UNKNOWN (230861404): + Impossible to determine current state of the + iteration. + STATE_UNSPECIFIED (470755401): + Default value. This value is unused. + """ + UNDEFINED_STATE = 0 + STATE_CANCELLED = 534636259 + STATE_COMPLETED = 265728989 + STATE_FAILED = 50857931 + STATE_PAUSED = 337513660 + STATE_PROCESSING = 74195873 + STATE_UNKNOWN = 230861404 + STATE_UNSPECIFIED = 470755401 + + rollout: str = proto.Field( + proto.STRING, + number=303366577, + optional=True, + ) + rollout_plan: str = proto.Field( + proto.STRING, + number=459057399, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + + class GroupMaintenanceInfo(proto.Message): r"""Maintenance Info for ReservationBlocks. @@ -42834,11 +48606,12 @@ class GroupMaintenanceInfo(proto.Message): This field is a member of `oneof`_ ``_subblock_infra_maintenance_ongoing_count``. subblock_infra_maintenance_pending_count (int): Describes number of subblock Infrastructure - that has pending maintenance. Here, Subblock + that has pending maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream - hardware contained in the Subblock that is - necessary for a VM Family (e.g. NVLink Domains). - Not all VM Families will support this field. + hardware contained in the Subblock that is + necessary for a VM Family (e.g. NVLink + Domains). Not all VM Families will support this + field. This field is a member of `oneof`_ ``_subblock_infra_maintenance_pending_count``. upcoming_group_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): @@ -42919,8 +48692,8 @@ class GuestAttributes(proto.Message): Attributes: kind (str): - [Output Only] Type of the resource. Always - compute#guestAttributes for guest attributes entry. + [Output Only] Type of the resource. + Alwayscompute#guestAttributes for guest attributes entry. This field is a member of `oneof`_ ``_kind``. query_path (str): @@ -43041,11 +48814,24 @@ class GuestOsFeature(proto.Message): type_ (str): The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the - following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF - SNP_SVSM_CAPABLE For - more information, see Enabling guest operating system + following values: + + :: + + - VIRTIO_SCSI_MULTIQUEUE + - WINDOWS + - MULTI_IP_SUBNET + - UEFI_COMPATIBLE + - GVNIC + - SEV_CAPABLE + - SUSPEND_RESUME_COMPATIBLE + - SEV_LIVE_MIGRATABLE_V2 + - SEV_SNP_CAPABLE + - TDX_CAPABLE + - IDPF + - SNP_SVSM_CAPABLE + + For more information, see Enabling guest operating system features. Check the Type enum for the list of possible values. @@ -43054,12 +48840,24 @@ class GuestOsFeature(proto.Message): class Type(proto.Enum): r"""The ID of a supported feature. To add multiple values, use commas to - separate values. Set to one or more of the following values: - - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF - - SNP_SVSM_CAPABLE For more information, see Enabling guest operating - system features. + separate values. Set to one or more of the following values: + + :: + + - VIRTIO_SCSI_MULTIQUEUE + - WINDOWS + - MULTI_IP_SUBNET + - UEFI_COMPATIBLE + - GVNIC + - SEV_CAPABLE + - SUSPEND_RESUME_COMPATIBLE + - SEV_LIVE_MIGRATABLE_V2 + - SEV_SNP_CAPABLE + - TDX_CAPABLE + - IDPF + - SNP_SVSM_CAPABLE + + For more information, see Enabling guest operating system features. Values: UNDEFINED_TYPE (0): @@ -43134,13 +48932,14 @@ class HTTP2HealthCheck(proto.Message): packets are sent. The destination IP address depends on the type of load balancer. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest This field is a member of `oneof`_ ``_host``. port (int): The TCP port number to which the health check prober sends packets. The default value is 443. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -43150,7 +48949,7 @@ class HTTP2HealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -43163,14 +48962,16 @@ class HTTP2HealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -43183,8 +48984,8 @@ class HTTP2HealthCheck(proto.Message): This field is a member of `oneof`_ ``_proxy_header``. request_path (str): The request path of the HTTP/2 health check - request. The default value is /. Must comply - with RFC3986. + request. The default value is/. Must comply + withRFC3986. This field is a member of `oneof`_ ``_request_path``. response (str): @@ -43194,6 +48995,7 @@ class HTTP2HealthCheck(proto.Message): only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http This field is a member of `oneof`_ ``_response``. @@ -43202,7 +49004,7 @@ class HTTP2HealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -43214,13 +49016,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -43314,13 +49117,14 @@ class HTTPHealthCheck(proto.Message): packets are sent. The destination IP address depends on the type of load balancer. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest This field is a member of `oneof`_ ``_host``. port (int): The TCP port number to which the health check prober sends packets. The default value is 80. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -43330,13 +49134,13 @@ class HTTPHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Also supported in legacy HTTP health checks for target pools. The health check supports all backends supported by the backend service provided the backend can be health - checked. For example, GCE_VM_IP network endpoint groups, + checked. For example,GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check @@ -43344,15 +49148,16 @@ class HTTPHealthCheck(proto.Message): backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can - be health checked; for example, GCE_VM_IP_PORT network - endpoint groups and instance group backends. For - GCE_VM_IP_PORT network endpoint group backends, the health - check uses the port number specified for each endpoint in - the network endpoint group. For instance group backends, the - health check uses the port number determined by looking up - the backend service's named port in the instance group's - list of named ports. Check the PortSpecification enum for - the list of possible values. + be health checked; for example,GCE_VM_IP_PORT network + endpoint groups and instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. proxy_header (str): @@ -43364,8 +49169,8 @@ class HTTPHealthCheck(proto.Message): This field is a member of `oneof`_ ``_proxy_header``. request_path (str): The request path of the HTTP health check - request. The default value is /. Must comply - with RFC3986. + request. The default value is/. Must comply + withRFC3986. This field is a member of `oneof`_ ``_request_path``. response (str): @@ -43375,6 +49180,7 @@ class HTTPHealthCheck(proto.Message): only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http This field is a member of `oneof`_ ``_response``. @@ -43383,21 +49189,22 @@ class HTTPHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Also supported in legacy HTTP health checks for target pools. The health check supports all backends supported by the backend service provided the backend can be health - checked. For example, GCE_VM_IP network endpoint groups, + checked. For example,GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all - backends that can be health checked; for example, GCE_VM_IP_PORT - network endpoint groups and instance group backends. For - GCE_VM_IP_PORT network endpoint group backends, the health check + backends that can be health checked; for example,GCE_VM_IP_PORT + network endpoint groups and instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named @@ -43495,13 +49302,14 @@ class HTTPSHealthCheck(proto.Message): packets are sent. The destination IP address depends on the type of load balancer. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest This field is a member of `oneof`_ ``_host``. port (int): The TCP port number to which the health check prober sends packets. The default value is 443. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -43511,7 +49319,7 @@ class HTTPSHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -43524,14 +49332,16 @@ class HTTPSHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -43544,8 +49354,8 @@ class HTTPSHealthCheck(proto.Message): This field is a member of `oneof`_ ``_proxy_header``. request_path (str): The request path of the HTTPS health check - request. The default value is /. Must comply - with RFC3986. + request. The default value is/. Must comply + withRFC3986. This field is a member of `oneof`_ ``_request_path``. response (str): @@ -43555,6 +49365,7 @@ class HTTPSHealthCheck(proto.Message): only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http This field is a member of `oneof`_ ``_response``. @@ -43563,7 +49374,7 @@ class HTTPSHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -43575,13 +49386,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -43661,21 +49473,417 @@ class ProxyHeader(proto.Enum): ) +class HealthAggregationPoliciesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_aggregation_policies (MutableSequence[google.cloud.compute_v1beta.types.HealthAggregationPolicy]): + A list of HealthAggregationPolicys contained + in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of health aggregation policies when the list is + empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + health_aggregation_policies: MutableSequence[ + "HealthAggregationPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=87589904, + message="HealthAggregationPolicy", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class HealthAggregationPolicy(proto.Message): + r"""Represents a health aggregation policy. + + A health aggregation policy resource defines a policy to + aggregate health. + + For more information, see + Health checks overview. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a + HealthAggregationPolicy. An up-to-date + fingerprint must be provided in order to patch + the HealthAggregationPolicy; Otherwise, the + request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + HealthAggregationPolicy. + + This field is a member of `oneof`_ ``_fingerprint``. + healthy_percent_threshold (int): + Can only be set if the policyType field + isBACKEND_SERVICE_POLICY. Specifies the threshold (as a + percentage) of healthy endpoints required in order to + consider the aggregated health result HEALTHY. Defaults to + 60. Must be in range [0, 100]. Not applicable if the + policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. + This field is optional, and will be set to the default if + unspecified. Note that both this threshold and + minHealthyThreshold must be satisfied in order for HEALTHY + to be the aggregated result. "Endpoints" refers to network + endpoints within a Network Endpoint Group or instances + within an Instance Group. + + This field is a member of `oneof`_ ``_healthy_percent_threshold``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#healthAggregationPolicy for health aggregation + policies. + + This field is a member of `oneof`_ ``_kind``. + min_healthy_threshold (int): + Can only be set if the policyType field + isBACKEND_SERVICE_POLICY. Specifies the minimum number of + healthy endpoints required in order to consider the + aggregated health result HEALTHY. Defaults to 1. Must be + positive. Not applicable if the policyType field + isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is + optional, and will be set to the default if unspecified. + Note that both this threshold and healthyPercentThreshold + must be satisfied in order for HEALTHY to be the aggregated + result. "Endpoints" refers to network endpoints within a + Network Endpoint Group or instances within an Instance + Group. + + This field is a member of `oneof`_ ``_min_healthy_threshold``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + policy_type (str): + Specifies the type of the healthAggregationPolicy. The only + allowed value for global resources is DNS_PUBLIC_IP_POLICY. + The only allowed value for regional resources is + BACKEND_SERVICE_POLICY. Must be specified when the + healthAggregationPolicy is created, and cannot be mutated. + Check the PolicyType enum for the list of possible values. + + This field is a member of `oneof`_ ``_policy_type``. + region (str): + [Output Only] URL of the region where the health aggregation + policy resides. This field applies only to the regional + resource. You must specify this field as part of the HTTP + request URL. It is not settable as a field in the request + body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL with id for the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. + """ + + class PolicyType(proto.Enum): + r"""Specifies the type of the healthAggregationPolicy. The only allowed + value for global resources is DNS_PUBLIC_IP_POLICY. The only allowed + value for regional resources is BACKEND_SERVICE_POLICY. Must be + specified when the healthAggregationPolicy is created, and cannot be + mutated. + + Values: + UNDEFINED_POLICY_TYPE (0): + A value indicating that the enum field is not + set. + BACKEND_SERVICE_POLICY (415582023): + No description available. + DNS_PUBLIC_IP_POLICY (366354794): + No description available. + """ + UNDEFINED_POLICY_TYPE = 0 + BACKEND_SERVICE_POLICY = 415582023 + DNS_PUBLIC_IP_POLICY = 366354794 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + healthy_percent_threshold: int = proto.Field( + proto.UINT32, + number=72242895, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + min_healthy_threshold: int = proto.Field( + proto.UINT32, + number=132310940, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + policy_type: str = proto.Field( + proto.STRING, + number=18158119, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + + +class HealthAggregationPolicyAggregatedList(proto.Message): + r"""Contains a list of HealthAggregationPoliciesScopedList. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthAggregationPoliciesScopedList]): + A list of HealthAggregationPoliciesScopedList + resources. + kind (str): + Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "HealthAggregationPoliciesScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="HealthAggregationPoliciesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class HealthAggregationPolicyList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.HealthAggregationPolicy]): + A list of HealthAggregationPolicy resources. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#healthAggregationPolicy for health aggregation + policies. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["HealthAggregationPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="HealthAggregationPolicy", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + class HealthCheck(proto.Message): - r"""Represents a health check resource. Google Compute Engine has two - health check resources: \* - `Regional `__ - \* `Global `__ These - health check resources can be used for load balancing and for - autohealing VMs in a managed instance group (MIG). **Load - balancing** Health check requirements vary depending on the type of - load balancer. For details about the type of health check supported - for each load balancer and corresponding backend type, see Health - checks overview: Load balancer guide. **Autohealing in MIGs** The - health checks that you use for autohealing VMs in a MIG can be + r"""Represents a health check resource. + + Google Compute Engine has two health check resources: + + - `Regional `__ + - `Global `__ + + These health check resources can be used for load balancing and for + autohealing VMs in a managed instance group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type of load + balancer. For details about the type of health check supported for + each load balancer and corresponding backend type, see Health checks + overview: Load balancer guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in a MIG can be either regional or global. For more information, see Set up an - application health check and autohealing. For more information, see - Health checks overview. + application health check and autohealing. + + For more information, seeHealth checks overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -43687,7 +49895,7 @@ class HealthCheck(proto.Message): This field is a member of `oneof`_ ``_check_interval_sec``. creation_timestamp (str): - [Output Only] Creation timestamp in 3339 text format. + [Output Only] Creation timestamp in3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -43733,7 +49941,7 @@ class HealthCheck(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. For example, a name that is 1-63 + and comply withRFC1035. For example, a name that is 1-63 characters long, matches the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``, and otherwise complies with RFC1035. This regular expression describes a name where the @@ -43760,15 +49968,18 @@ class HealthCheck(proto.Message): for global health check. If this list is non-empty, then there are restrictions on what other health check fields are supported and what - other resources can use this health check: - - SSL, HTTP2, and GRPC protocols are not - supported. - The TCP request field is not - supported. - The proxyHeader field for HTTP, - HTTPS, and TCP is not supported. - The - checkIntervalSec field must be at least 30. - - The health check cannot be used with - BackendService nor with managed instance group - auto-healing. + other resources can use this health check: + + - SSL, HTTP2, and GRPC protocols are not + supported. + - The TCP request field is not supported. + - The proxyHeader field for HTTP, HTTPS, and + TCP is not supported. + - The checkIntervalSec field must be at least + 30. + - The health check cannot be used with + BackendService nor with managed instance + group auto-healing. ssl_health_check (google.cloud.compute_v1beta.types.SSLHealthCheck): This field is a member of `oneof`_ ``_ssl_health_check``. @@ -43784,9 +49995,9 @@ class HealthCheck(proto.Message): This field is a member of `oneof`_ ``_timeout_sec``. type_ (str): Specifies the type of the healthCheck, either - TCP, SSL, HTTP, HTTPS, HTTP2 or GRPC. Exactly - one of the protocol-specific health check fields - must be specified, which must match type field. + TCP,SSL, HTTP, HTTPS,HTTP2 or GRPC. Exactly one + of the protocol-specific health check fields + must be specified, which must matchtype field. Check the Type enum for the list of possible values. @@ -43800,10 +50011,9 @@ class HealthCheck(proto.Message): """ class Type(proto.Enum): - r"""Specifies the type of the healthCheck, either TCP, SSL, HTTP, - HTTPS, HTTP2 or GRPC. Exactly one of the protocol-specific - health check fields must be specified, which must match type - field. + r"""Specifies the type of the healthCheck, either TCP,SSL, HTTP, + HTTPS,HTTP2 or GRPC. Exactly one of the protocol-specific health + check fields must be specified, which must matchtype field. Values: UNDEFINED_TYPE (0): @@ -43970,7 +50180,7 @@ class HealthCheckList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -44048,10 +50258,12 @@ class HealthCheckLogConfig(proto.Message): class HealthCheckReference(proto.Message): r"""A full or valid partial URL to a health check. For example, - the following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check - - projects/project-id/global/httpHealthChecks/health-check - - global/httpHealthChecks/health-check + the following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check + - projects/project-id/global/httpHealthChecks/health-check + - global/httpHealthChecks/health-check .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -44076,7 +50288,7 @@ class HealthCheckService(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -44100,48 +50312,57 @@ class HealthCheckService(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. health_checks (MutableSequence[str]): A list of URLs to the HealthCheck resources. Must have at - least one HealthCheck, and not more than 10 for regional - HealthCheckService, and not more than 1 for global - HealthCheckService. HealthCheck resources must have - portSpecification=USE_SERVING_PORT or - portSpecification=USE_FIXED_PORT. For regional - HealthCheckService, the HealthCheck must be regional and in - the same region. For global HealthCheckService, HealthCheck - must be global. Mix of regional and global HealthChecks is - not supported. Multiple regional HealthChecks must belong to - the same region. Regional HealthChecks must belong to the - same region as zones of NetworkEndpointGroups. For global - HealthCheckService using global INTERNET_IP_PORT + least one HealthCheck, and not more than 10 for + regionalHealthCheckService, and not more than 1 for + globalHealthCheckService.HealthCheck resources must + haveportSpecification=USE_SERVING_PORT + orportSpecification=USE_FIXED_PORT. For regional + HealthCheckService, theHealthCheck must be regional and in + the same region. For global HealthCheckService,HealthCheck + must be global. Mix of regional and globalHealthChecks is + not supported. Multiple regionalHealthChecks must belong to + the same region. RegionalHealthChecks must belong to the + same region as zones ofNetworkEndpointGroups. For + globalHealthCheckService using globalINTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions - can only be used with global INTERNET_IP_PORT - NetworkEndpointGroups. + can only be used with global + INTERNET_IP_PORTNetworkEndpointGroups. health_status_aggregation_policy (str): Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to - NO_AGGREGATION if unspecified. - NO_AGGREGATION. An - EndpointHealth message is returned for each pair in the - health check service. - AND. If any health check of an - endpoint reports UNHEALTHY, then UNHEALTHY is the - HealthState of the endpoint. If all health checks report - HEALTHY, the HealthState of the endpoint is HEALTHY. . This - is only allowed with regional HealthCheckService. Check the - HealthStatusAggregationPolicy enum for the list of possible - values. + NO_AGGREGATION if unspecified. + + :: + + - NO_AGGREGATION. An EndpointHealth message is + returned for each pair in the health check + service. + - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY. + + . This is only allowed with regional HealthCheckService. + Check the HealthStatusAggregationPolicy enum for the list of + possible values. This field is a member of `oneof`_ ``_health_status_aggregation_policy``. health_status_aggregation_strategy (str): This field is deprecated. Use - health_status_aggregation_policy instead. Policy for how the - results from multiple health checks for the same endpoint - are aggregated. - NO_AGGREGATION. An EndpointHealth message - is returned for each backend in the health check service. - - AND. If any backend's health check reports UNHEALTHY, then - UNHEALTHY is the HealthState of the entire health check - service. If all backend's are healthy, the HealthState of - the health check service is HEALTHY. . Check the - HealthStatusAggregationStrategy enum for the list of - possible values. + health_status_aggregation_policy instead. + + Policy for how the results from multiple health checks for + the same endpoint are aggregated. + + :: + + - NO_AGGREGATION. An EndpointHealth + message is returned for each backend in the health check + service. + - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If + all backend's are healthy, the HealthState of the + health check service is HEALTHY. + + . Check the HealthStatusAggregationStrategy enum for the + list of possible values. This field is a member of `oneof`_ ``_health_status_aggregation_strategy``. id (int): @@ -44150,8 +50371,8 @@ class HealthCheckService(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#healthCheckServicefor health check services. + [Output only] Type of the resource. + Alwayscompute#healthCheckServicefor health check services. This field is a member of `oneof`_ ``_kind``. name (str): @@ -44166,19 +50387,19 @@ class HealthCheckService(proto.Message): This field is a member of `oneof`_ ``_name``. network_endpoint_groups (MutableSequence[str]): A list of URLs to the NetworkEndpointGroup resources. Must - not have more than 100. For regional HealthCheckService, - NEGs must be in zones in the region of the - HealthCheckService. For global HealthCheckServices, the - NetworkEndpointGroups must be global INTERNET_IP_PORT. + not have more than 100. For regionalHealthCheckService, NEGs + must be in zones in the region of the HealthCheckService. + For globalHealthCheckServices, the NetworkEndpointGroups + must be global INTERNET_IP_PORT. notification_endpoints (MutableSequence[str]): A list of URLs to the NotificationEndpoint - resources. Must not have more than 10. A list of - endpoints for receiving notifications of change - in health status. For regional - HealthCheckService, NotificationEndpoint must be - regional and in the same region. For global - HealthCheckService, NotificationEndpoint must be - global. + resources. Must not have more than 10. A list + of endpoints for receiving notifications of + change in health status. For + regionalHealthCheckService,NotificationEndpoint + must be regional and in the same region. For + global HealthCheckService,NotificationEndpoint + must be global. region (str): [Output Only] URL of the region where the health check service resides. This field is not applicable to global @@ -44196,14 +50417,18 @@ class HealthCheckService(proto.Message): class HealthStatusAggregationPolicy(proto.Enum): r"""Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if - unspecified. - NO_AGGREGATION. An EndpointHealth message is returned - for each pair in the health check service. - AND. If any health - check of an endpoint reports UNHEALTHY, then UNHEALTHY is the - HealthState of the endpoint. If all health checks report HEALTHY, - the HealthState of the endpoint is HEALTHY. . This is only allowed - with regional HealthCheckService. Additional supported values which - may be not listed in the enum directly due to technical reasons: AND - NO_AGGREGATION + unspecified. + + :: + + - NO_AGGREGATION. An EndpointHealth message is + returned for each pair in the health check + service. + - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY. + + . This is only allowed with regional HealthCheckService. Additional + supported values which may be not listed in the enum directly due to + technical reasons: AND NO_AGGREGATION Values: UNDEFINED_HEALTH_STATUS_AGGREGATION_POLICY (0): @@ -44220,15 +50445,22 @@ class HealthStatusAggregationPolicy(proto.Enum): class HealthStatusAggregationStrategy(proto.Enum): r"""This field is deprecated. Use health_status_aggregation_policy - instead. Policy for how the results from multiple health checks for - the same endpoint are aggregated. - NO_AGGREGATION. An - EndpointHealth message is returned for each backend in the health - check service. - AND. If any backend's health check reports - UNHEALTHY, then UNHEALTHY is the HealthState of the entire health - check service. If all backend's are healthy, the HealthState of the - health check service is HEALTHY. . Additional supported values which - may be not listed in the enum directly due to technical reasons: AND - NO_AGGREGATION + instead. + + Policy for how the results from multiple health checks for the same + endpoint are aggregated. + + :: + + - NO_AGGREGATION. An EndpointHealth + message is returned for each backend in the health check + service. + - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If + all backend's are healthy, the HealthState of the + health check service is HEALTHY. + + . Additional supported values which may be not listed in the enum + directly due to technical reasons: AND NO_AGGREGATION Values: UNDEFINED_HEALTH_STATUS_AGGREGATION_STRATEGY (0): @@ -44303,11 +50535,13 @@ class HealthStatusAggregationStrategy(proto.Enum): class HealthCheckServiceReference(proto.Message): r"""A full or valid partial URL to a health check service. For - example, the following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service - - - projects/project-id/regions/us-west1/healthCheckServices/health-check-service - - regions/us-west1/healthCheckServices/health-check-service + example, the following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service + - + projects/project-id/regions/us-west1/healthCheckServices/health-check-service + - regions/us-west1/healthCheckServices/health-check-service .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -44339,15 +50573,15 @@ class HealthCheckServicesList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.HealthCheckService]): A list of HealthCheckService resources. kind (str): - [Output Only] Type of the resource. Always - compute#healthCheckServicesList for lists of + [Output Only] Type of the resource. + Alwayscompute#healthCheckServicesList for lists of HealthCheckServices. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -44420,7 +50654,287 @@ class HealthChecksAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "HealthChecksScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="HealthChecksScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class HealthChecksScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): + A list of HealthChecks contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + health_checks: MutableSequence["HealthCheck"] = proto.RepeatedField( + proto.MESSAGE, + number=448370606, + message="HealthCheck", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class HealthSource(proto.Message): + r"""Represents a health source. + + A health source resource specifies the source resources and the + health aggregation policy applied to the source resources to + determine the aggregated health status. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a HealthSource. An + up-to-date fingerprint must be provided in order + to patch the HealthSource; Otherwise, the + request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + HealthSource. + + This field is a member of `oneof`_ ``_fingerprint``. + health_aggregation_policy (str): + URL to the HealthAggregationPolicy resource. + Must be set. Must be regional and in the same + region as the HealthSource. Can be mutated. + + This field is a member of `oneof`_ ``_health_aggregation_policy``. + id (int): + [Output Only] A unique identifier for this resource type. + The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#healthSource for health sources. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + region (str): + [Output Only] URL of the region where the health source + resides. This field applies only to the regional resource. + You must specify this field as part of the HTTP request URL. + It is not settable as a field in the request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL with id for the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. + source_type (str): + Specifies the type of the HealthSource. The only allowed + value is BACKEND_SERVICE. Must be specified when + theHealthSource is created, and cannot be mutated. Check the + SourceType enum for the list of possible values. + + This field is a member of `oneof`_ ``_source_type``. + sources (MutableSequence[str]): + URLs to the source resources. Must be size 1. Must be + aBackendService if the sourceType is BACKEND_SERVICE. + TheBackendService must have load balancing schemeINTERNAL or + INTERNAL_MANAGED and must be regional and in the same region + as the HealthSource (cross-region deployment for + INTERNAL_MANAGED is not supported). TheBackendService may + use only IGs, MIGs, or NEGs of typeGCE_VM_IP or + GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can + be mutated. + """ + + class SourceType(proto.Enum): + r"""Specifies the type of the HealthSource. The only allowed value is + BACKEND_SERVICE. Must be specified when theHealthSource is created, + and cannot be mutated. + + Values: + UNDEFINED_SOURCE_TYPE (0): + A value indicating that the enum field is not + set. + BACKEND_SERVICE (285792202): + No description available. + """ + UNDEFINED_SOURCE_TYPE = 0 + BACKEND_SERVICE = 285792202 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + source_type: str = proto.Field( + proto.STRING, + number=452245726, + optional=True, + ) + sources: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=125606840, + ) + + +class HealthSourceAggregatedList(proto.Message): + r"""Contains a list of HealthSourcesScopedList. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthSourcesScopedList]): + A list of HealthSourcesScopedList resources. + kind (str): + Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -44447,11 +50961,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableMapping[str, "HealthChecksScopedList"] = proto.MapField( + items: MutableMapping[str, "HealthSourcesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, - message="HealthChecksScopedList", + message="HealthSourcesScopedList", ) kind: str = proto.Field( proto.STRING, @@ -44480,279 +50994,6 @@ def raw_page(self): ) -class HealthChecksScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): - A list of HealthChecks contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of backend services when the list is empty. - - This field is a member of `oneof`_ ``_warning``. - """ - - health_checks: MutableSequence["HealthCheck"] = proto.RepeatedField( - proto.MESSAGE, - number=448370606, - message="HealthCheck", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) - - -class HealthSource(proto.Message): - r"""Represents a health source. A health source resource - specifies the source resources and the health aggregation policy - applied to the source resources to determine the aggregated - health status. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - fingerprint (str): - Fingerprint of this resource. A hash of the - contents stored in this object. This field is - used in optimistic locking. This field will be - ignored when inserting a HealthSource. An - up-to-date fingerprint must be provided in order - to patch the HealthSource; Otherwise, the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve the - HealthSource. - - This field is a member of `oneof`_ ``_fingerprint``. - health_aggregation_policy (str): - URL to the HealthAggregationPolicy resource. - Must be set. Must be regional and in the same - region as the HealthSource. Can be mutated. - - This field is a member of `oneof`_ ``_health_aggregation_policy``. - id (int): - [Output Only] A unique identifier for this resource type. - The server generates this identifier. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#healthSource for health sources. - - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - - This field is a member of `oneof`_ ``_name``. - region (str): - [Output Only] URL of the region where the health source - resides. This field applies only to the regional resource. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. - - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. - - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL with id for the resource. - - This field is a member of `oneof`_ ``_self_link_with_id``. - source_type (str): - Specifies the type of the HealthSource. The only allowed - value is BACKEND_SERVICE. Must be specified when the - HealthSource is created, and cannot be mutated. Check the - SourceType enum for the list of possible values. - - This field is a member of `oneof`_ ``_source_type``. - sources (MutableSequence[str]): - URLs to the source resources. Must be size 1. Must be a - BackendService if the sourceType is BACKEND_SERVICE. The - BackendService must have load balancing scheme INTERNAL or - INTERNAL_MANAGED and must be regional and in the same region - as the HealthSource (cross-region deployment for - INTERNAL_MANAGED is not supported). The BackendService may - use only IGs, MIGs, or NEGs of type GCE_VM_IP or - GCE_VM_IP_PORT. The BackendService may not use haPolicy. Can - be mutated. - """ - - class SourceType(proto.Enum): - r"""Specifies the type of the HealthSource. The only allowed value is - BACKEND_SERVICE. Must be specified when the HealthSource is created, - and cannot be mutated. - - Values: - UNDEFINED_SOURCE_TYPE (0): - A value indicating that the enum field is not - set. - BACKEND_SERVICE (285792202): - No description available. - """ - UNDEFINED_SOURCE_TYPE = 0 - BACKEND_SERVICE = 285792202 - - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, - optional=True, - ) - health_aggregation_policy: str = proto.Field( - proto.STRING, - number=240314354, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - self_link_with_id: str = proto.Field( - proto.STRING, - number=44520962, - optional=True, - ) - source_type: str = proto.Field( - proto.STRING, - number=452245726, - optional=True, - ) - sources: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=125606840, - ) - - -class HealthSourceAggregatedList(proto.Message): - r"""Contains a list of HealthSourcesScopedList. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthSourcesScopedList]): - A list of HealthSourcesScopedList resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - - This field is a member of `oneof`_ ``_warning``. - """ - - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "HealthSourcesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="HealthSourcesScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) - - class HealthSourceList(proto.Message): r""" @@ -44767,14 +51008,14 @@ class HealthSourceList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.HealthSource]): A list of HealthSource resources. kind (str): - [Output Only] Type of the resource. Always - compute#healthSource for health sources. + [Output Only] Type of the resource. + Alwayscompute#healthSource for health sources. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -45094,8 +51335,9 @@ class HealthStatusForNetworkEndpoint(proto.Message): class HealthState(proto.Enum): r"""Health state of the network endpoint determined based on the - health checks configured. Additional supported values which may - be not listed in the enum directly due to technical reasons: + health checks configured. + Additional supported values which may be not listed in the enum + directly due to technical reasons: DRAINING HEALTHY @@ -45123,8 +51365,9 @@ class HealthState(proto.Enum): class Ipv6HealthState(proto.Enum): r"""Health state of the ipv6 network endpoint determined based on - the health checks configured. Additional supported values which - may be not listed in the enum directly due to technical reasons: + the health checks configured. + Additional supported values which may be not listed in the enum + directly due to technical reasons: DRAINING HEALTHY @@ -45176,10 +51419,11 @@ class Ipv6HealthState(proto.Enum): class Help(proto.Message): r"""Provides links to documentation or for performing an out of - band action. For example, if a quota check failed with an error - indicating the calling project hasn't enabled the accessed - service, this can contain a URL pointing directly to the right - place in the developer console to flip the bit. + band action. + For example, if a quota check failed with an error indicating + the calling project hasn't enabled the accessed service, this + can contain a URL pointing directly to the right place in the + developer console to flip the bit. Attributes: links (MutableSequence[google.cloud.compute_v1beta.types.HelpLink]): @@ -45223,8 +51467,9 @@ class HelpLink(proto.Message): class HostRule(proto.Message): - r"""UrlMaps A host-matching rule for a URL. If matched, will use - the named PathMatcher to select the BackendService. + r"""UrlMaps + A host-matching rule for a URL. If matched, will use the + namedPathMatcher to select the BackendService. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -45239,12 +51484,14 @@ class HostRule(proto.Message): hosts (MutableSequence[str]): The list of host patterns to match. They must be valid hostnames with optional port numbers in the format - host:port. \* matches any string of ([a-z0-9-.]\*). In that + host:port.\* matches any string of ([a-z0-9-.]\*). In that case, \* must be the first character, and if followed by anything, the immediate following character must be either - - or .. \* based matching is not supported when the URL map is - bound to a target gRPC proxy that has the - validateForProxyless field set to true. + or .. + + - based matching is not supported when the URL map is bound + to a target gRPC proxy that has the validateForProxyless + field set to true. path_matcher (str): The name of the PathMatcher to use to match the path portion of the URL if the hostRule @@ -45279,19 +51526,22 @@ class HttpFaultAbort(proto.Message): Attributes: http_status (int): The HTTP status code used to abort the - request. The value must be from 200 to 599 - inclusive. For gRPC protocol, the gRPC status - code is mapped to HTTP status code according to - this mapping table. HTTP status 200 is mapped to - gRPC status UNKNOWN. Injecting an OK status is + request. + The value must be from 200 to 599 inclusive. + + For gRPC protocol, the gRPC status code is + mapped to HTTP status code according to this + mapping table. HTTP status 200 is mapped to gRPC + status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director. This field is a member of `oneof`_ ``_http_status``. percentage (float): The percentage of traffic for connections, operations, or requests that is aborted as part - of fault injection. The value must be from 0.0 - to 100.0 inclusive. + of fault injection. + + The value must be from 0.0 to 100.0 inclusive. This field is a member of `oneof`_ ``_percentage``. """ @@ -45325,8 +51575,9 @@ class HttpFaultDelay(proto.Message): percentage (float): The percentage of traffic for connections, operations, or requests for which a delay is - introduced as part of fault injection. The value - must be from 0.0 to 100.0 inclusive. + introduced as part of fault injection. + + The value must be from 0.0 to 100.0 inclusive. This field is a member of `oneof`_ ``_percentage``. """ @@ -45394,8 +51645,8 @@ class HttpFilterConfig(proto.Message): Attributes: config (str): - The configuration needed to enable the - networkservices.HttpFilter resource. The + The configuration needed to enable + thenetworkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl @@ -45404,8 +51655,8 @@ class HttpFilterConfig(proto.Message): config_type_url (str): The fully qualified versioned proto3 type url of the protobuf that the filter expects for its - contextual settings, for example: - type.googleapis.com/google.protobuf.Struct + contextual settings, for + example:type.googleapis.com/google.protobuf.Struct This field is a member of `oneof`_ ``_config_type_url``. filter_name (str): @@ -45442,7 +51693,7 @@ class HttpHeaderAction(proto.Message): Attributes: request_headers_to_add (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderOption]): Headers to add to a matching request before - forwarding the request to the backendService. + forwarding the request to thebackendService. request_headers_to_remove (MutableSequence[str]): A list of header names for headers that need to be removed from the request before forwarding @@ -45484,22 +51735,28 @@ class HttpHeaderMatch(proto.Message): Attributes: exact_match (str): The value should exactly match contents of - exactMatch. Only one of exactMatch, prefixMatch, - suffixMatch, regexMatch, presentMatch or - rangeMatch must be set. + exactMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. This field is a member of `oneof`_ ``_exact_match``. header_name (str): - The name of the HTTP header to match. For matching against - the HTTP request's authority, use a headerMatch with the - header name ":authority". For matching a request's method, - use the headerName ":method". When the URL map is bound to a - target gRPC proxy that has the validateForProxyless field - set to true, only non-binary user-specified custom metadata - and the ``content-type`` header are supported. The following - transport-level headers cannot be used in header matching - rules: ``:authority``, ``:method``, ``:path``, ``:scheme``, - ``user-agent``, ``accept-encoding``, ``content-encoding``, + The name of the HTTP header to match. + + For matching against the HTTP request's authority, use a + headerMatch with the header name ":authority". + + For matching a request's method, use the headerName + ":method". + + When the URL map is bound to a target gRPC proxy that has + the validateForProxyless field set to true, only non-binary + user-specified custom metadata and the ``content-type`` + header are supported. The following transport-level headers + cannot be used in header matching rules: ``:authority``, + ``:method``, ``:path``, ``:scheme``, ``user-agent``, + ``accept-encoding``, ``content-encoding``, ``grpc-accept-encoding``, ``grpc-encoding``, ``grpc-previous-rpc-attempts``, ``grpc-tags-bin``, ``grpc-timeout`` and ``grpc-trace-bin``. @@ -45510,56 +51767,73 @@ class HttpHeaderMatch(proto.Message): considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the - preceding match criteria are NOT met. The - default setting is false. + preceding match criteria are NOT met. + + The default setting is false. This field is a member of `oneof`_ ``_invert_match``. prefix_match (str): The value of the header must start with the - contents of prefixMatch. Only one of exactMatch, - prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. + contents ofprefixMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. This field is a member of `oneof`_ ``_prefix_match``. present_match (bool): A header with the contents of headerName must exist. The match takes place whether or not the - request's header has a value. Only one of - exactMatch, prefixMatch, suffixMatch, - regexMatch, presentMatch or rangeMatch must be + request's header has a value. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be set. This field is a member of `oneof`_ ``_present_match``. range_match (google.cloud.compute_v1beta.types.Int64RangeMatch): The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not - contain an integer, number or is empty, the match fails. For - example for a range [-5, 0] - -3 will match. - 0 will not - match. - 0.25 will not match. - -3someString will not match. - Only one of exactMatch, prefixMatch, suffixMatch, - regexMatch, presentMatch or rangeMatch must be set. + contain an integer, number or is empty, the match fails. + + For example for a range [-5, 0] + + :: + + - -3 will match. + - 0 will not match. + - 0.25 will not match. + - -3someString will not match. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be set. + rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. This field is a member of `oneof`_ ``_range_match``. regex_match (str): The value of the header must match the regular expression - specified in regexMatch. For more information about regular - expression syntax, see Syntax. For matching against a port - specified in the HTTP request, use a headerMatch with - headerName set to PORT and a regular expression that - satisfies the RFC2616 Host header's port specifier. Only one - of exactMatch, prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. Regular expressions - can only be used when the loadBalancingScheme is set to - INTERNAL_SELF_MANAGED. + specified inregexMatch. For more information about regular + expression syntax, see Syntax. + + For matching against a port specified in the HTTP request, + use a headerMatch with headerName set to PORT and a regular + expression that satisfies the RFC2616 Host header's port + specifier. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be set. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_regex_match``. suffix_match (str): The value of the header must end with the - contents of suffixMatch. Only one of exactMatch, - prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. + contents ofsuffixMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. This field is a member of `oneof`_ ``_suffix_match``. """ @@ -45625,12 +51899,15 @@ class HttpHeaderOption(proto.Message): This field is a member of `oneof`_ ``_header_value``. replace (bool): If false, headerValue is appended to any - values that already exist for the header. If - true, headerValue is set for the header, - discarding any values that were set for that - header. The default value is true, unless a - variable is present in headerValue, in which - case the default value is false. . + values that already + exist for the header. If true, headerValue is + set for the header, discarding any values that + were set for that header. + + The default value is true, + unless a variable is present in headerValue, + in which case the default value is false. + . This field is a member of `oneof`_ ``_replace``. """ @@ -45661,8 +51938,10 @@ class HttpQueryParameterMatch(proto.Message): exact_match (str): The queryParameterMatch matches if the value of the parameter exactly matches the contents of - exactMatch. Only one of presentMatch, - exactMatch, or regexMatch must be set. + exactMatch. + + Only one of presentMatch, exactMatch, + orregexMatch must be set. This field is a member of `oneof`_ ``_exact_match``. name (str): @@ -45675,18 +51954,23 @@ class HttpQueryParameterMatch(proto.Message): Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter - has a value or not. Only one of presentMatch, - exactMatch, or regexMatch must be set. + has a value or not. + + Only one of presentMatch, exactMatch, + orregexMatch must be set. This field is a member of `oneof`_ ``_present_match``. regex_match (str): The queryParameterMatch matches if the value of the - parameter matches the regular expression specified by - regexMatch. For more information about regular expression - syntax, see Syntax. Only one of presentMatch, exactMatch, or - regexMatch must be set. Regular expressions can only be used - when the loadBalancingScheme is set to - INTERNAL_SELF_MANAGED. + parameter matches the regular expression specified + byregexMatch. For more information about regular expression + syntax, see Syntax. + + Only one of presentMatch, exactMatch, orregexMatch must be + set. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_regex_match``. """ @@ -45722,28 +52006,36 @@ class HttpRedirectAction(proto.Message): host_redirect (str): The host that is used in the redirect response instead of the one that was supplied in - the request. The value must be from 1 to 255 + the request. + + The value must be from 1 to 255 characters. This field is a member of `oneof`_ ``_host_redirect``. https_redirect (bool): If set to true, the URL scheme in the - redirected request is set to HTTPS. If set to - false, the URL scheme of the redirected request - remains the same as that of the request. This - must only be set for URL maps used in - TargetHttpProxys. Setting this true for - TargetHttpsProxy is not permitted. The default - is set to false. + redirected request is set to HTTPS. + If set to false, the URL scheme of the + redirected request remains the same as that of + the request. + + This must only be set for URL maps used + inTargetHttpProxys. Setting this true + forTargetHttpsProxy is not permitted. + + The default is set to false. This field is a member of `oneof`_ ``_https_redirect``. path_redirect (str): The path that is used in the redirect response instead of the one that was supplied in - the request. pathRedirect cannot be supplied - together with prefixRedirect. Supply one alone - or neither. If neither is supplied, the path of - the original request is used for the redirect. + the request. + + pathRedirect cannot be supplied together + withprefixRedirect. Supply one alone or neither. + If neither is supplied, the path of the original + request is used for the redirect. + The value must be from 1 to 1024 characters. This field is a member of `oneof`_ ``_path_redirect``. @@ -45751,44 +52043,63 @@ class HttpRedirectAction(proto.Message): The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before - redirecting the request. prefixRedirect cannot - be supplied together with pathRedirect. Supply - one alone or neither. If neither is supplied, - the path of the original request is used for the - redirect. The value must be from 1 to 1024 - characters. + redirecting the request. + + prefixRedirect cannot be supplied together + withpathRedirect. Supply one alone or neither. + If neither is supplied, the path of the original + request is used for the redirect. + + The value must be from 1 to 1024 characters. This field is a member of `oneof`_ ``_prefix_redirect``. redirect_response_code (str): The HTTP Status code to use for this RedirectAction. - Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is - the default value and corresponds to 301. - FOUND, which - corresponds to 302. - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, - the request method is retained. - PERMANENT_REDIRECT, which - corresponds to 308. In this case, the request method is - retained. Check the RedirectResponseCode enum for the list - of possible values. + + Supported values are: + + :: + + - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds + to 301. + - FOUND, which corresponds to 302. + - SEE_OTHER which corresponds to 303. + - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request + method is retained. + - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request + method is retained. + + Check the RedirectResponseCode enum for the list of possible + values. This field is a member of `oneof`_ ``_redirect_response_code``. strip_query (bool): If set to true, any accompanying query - portion of the original URL is removed before - redirecting the request. If set to false, the - query portion of the original URL is retained. + portion of the original URL is + removed before redirecting the request. If set + to false, the query portion of the original URL + is retained. + The default is set to false. This field is a member of `oneof`_ ``_strip_query``. """ class RedirectResponseCode(proto.Enum): - r"""The HTTP Status code to use for this RedirectAction. Supported - values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value - and corresponds to 301. - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which - corresponds to 307. In this case, the request method is retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, the - request method is retained. + r"""The HTTP Status code to use for this RedirectAction. + + Supported values are: + + :: + + - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds + to 301. + - FOUND, which corresponds to 302. + - SEE_OTHER which corresponds to 303. + - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request + method is retained. + - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request + method is retained. Values: UNDEFINED_REDIRECT_RESPONSE_CODE (0): @@ -45860,46 +52171,62 @@ class HttpRetryPolicy(proto.Message): This field is a member of `oneof`_ ``_num_retries``. per_try_timeout (google.cloud.compute_v1beta.types.Duration): Specifies a non-zero timeout per retry - attempt. If not specified, will use the timeout - set in the HttpRouteAction field. If timeout in - the HttpRouteAction field is not set, this field - uses the largest timeout among all backend - services associated with the route. Not - supported when the URL map is bound to a target - gRPC proxy that has the validateForProxyless - field set to true. + attempt. + If not specified, will use the timeout set in + theHttpRouteAction field. If timeout in the + HttpRouteAction field is not set, this field + uses the largest timeout + among all backend services associated with the + route. + + Not supported when the URL map is bound to a + target gRPC proxy that has the + validateForProxyless field set to true. This field is a member of `oneof`_ ``_per_try_timeout``. retry_conditions (MutableSequence[str]): Specifies one or more conditions when this retry policy - applies. Valid values are: - 5xx: retry is attempted if the - instance or endpoint responds with any 5xx response code, or - if the instance or endpoint does not respond at all. For - example, disconnects, reset, read timeout, connection - failure, and refused streams. - gateway-error: Similar to - 5xx, but only applies to response codes 502, 503 or 504. - - connect-failure: a retry is attempted on failures connecting - to the instance or endpoint. For example, connection - timeouts. - retriable-4xx: a retry is attempted if the - instance or endpoint responds with a 4xx response code. The - only error that you can retry is error code 409. - - refused-stream: a retry is attempted if the instance or - endpoint resets the stream with a REFUSED_STREAM error code. - This reset type indicates that it is safe to retry. - - cancelled: a retry is attempted if the gRPC status code in - the response header is set to cancelled. - - deadline-exceeded: a retry is attempted if the gRPC status - code in the response header is set to deadline-exceeded. - - internal: a retry is attempted if the gRPC status code in - the response header is set to internal. - - resource-exhausted: a retry is attempted if the gRPC status - code in the response header is set to resource-exhausted. - - unavailable: a retry is attempted if the gRPC status code in - the response header is set to unavailable. Only the - following codes are supported when the URL map is bound to - target gRPC proxy that has validateForProxyless field set to - true. - cancelled - deadline-exceeded - internal - - resource-exhausted - unavailable + applies. Valid values are: + + :: + + - 5xx: retry is attempted if the instance or endpoint + responds with any 5xx response code, or if the instance or + endpoint does not respond at all. For example, disconnects, reset, read + timeout, connection failure, and refused streams. + - gateway-error: Similar to 5xx, but only + applies to response codes 502, 503 or504. + - connect-failure: a retry is attempted on failures + connecting to the instance or endpoint. For example, connection + timeouts. + - retriable-4xx: a retry is attempted if the instance + or endpoint responds with a 4xx response code. + The only error that you can retry is error code 409. + - refused-stream: a retry is attempted if the instance + or endpoint resets the stream with a REFUSED_STREAM error + code. This reset type indicates that it is safe to retry. + - cancelled: a retry is attempted if the gRPC status + code in the response header is set to cancelled. + - deadline-exceeded: a retry is attempted if the gRPC + status code in the response header is set todeadline-exceeded. + - internal: a retry is attempted if the gRPC + status code in the response header is set tointernal. + - resource-exhausted: a retry is attempted if the gRPC + status code in the response header is set toresource-exhausted. + - unavailable: a retry is attempted if the gRPC + status code in the response header is set tounavailable. + + Only the following codes are supported when the URL map is + bound to target gRPC proxy that has validateForProxyless + field set to true. + + :: + + - cancelled + - deadline-exceeded + - internal + - resource-exhausted + - unavailable """ num_retries: int = proto.Field( @@ -45930,8 +52257,10 @@ class HttpRouteAction(proto.Message): cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living - Standard. Not supported when the URL map is - bound to a target gRPC proxy. + Standard. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_cors_policy``. fault_injection_policy (google.cloud.compute_v1beta.types.HttpFaultInjection): @@ -45942,29 +52271,34 @@ class HttpRouteAction(proto.Message): load balancer on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted by the load balancer for a - percentage of requests. timeout and retry_policy is ignored + percentage of requests.timeout and retry_policy is ignored by clients that are configured with a fault_injection_policy - if: 1. The traffic is generated by fault injection AND 2. - The fault injection is not a delay fault injection. Fault - injection is not supported with the classic Application Load - Balancer . To see which load balancers support fault - injection, see Load balancing: Routing and traffic - management features. + if: + + 1. The traffic is generated by fault injection AND + 2. The fault injection is not a delay fault injection. Fault + injection is not supported with the classic Application + Load Balancer . To see which load balancers support fault + injection, see Load balancing: Routing and traffic + management features. This field is a member of `oneof`_ ``_fault_injection_policy``. max_stream_duration (google.cloud.compute_v1beta.types.Duration): Specifies the maximum duration (timeout) for streams on the selected route. Unlike the timeout field where the timeout duration starts from the time the request has been fully - processed (known as *end-of-stream*), the duration in this + processed (known as\ *end-of-stream*), the duration in this field is computed from the beginning of the stream until the response has been processed, including all retries. A stream - that does not complete in this duration is closed. If not - specified, this field uses the maximum maxStreamDuration - value among all backend services associated with the route. + that does not complete in this duration is closed. + + If not specified, this field uses the + maximummaxStreamDuration value among all backend services + associated with the route. + This field is only allowed if the Url map is used with - backend services with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. + backend services with loadBalancingScheme set + toINTERNAL_SELF_MANAGED. This field is a member of `oneof`_ ``_max_stream_duration``. request_mirror_policy (google.cloud.compute_v1beta.types.RequestMirrorPolicy): @@ -45974,9 +52308,11 @@ class HttpRouteAction(proto.Message): balancer does not wait for responses from the shadow service. Before sending traffic to the shadow service, the host / authority header is - suffixed with -shadow. Not supported when the - URL map is bound to a target gRPC proxy that has - the validateForProxyless field set to true. + suffixed with-shadow. + + Not supported when the URL map is bound to a + target gRPC proxy that has the + validateForProxyless field set to true. This field is a member of `oneof`_ ``_request_mirror_policy``. retry_policy (google.cloud.compute_v1beta.types.HttpRetryPolicy): @@ -45988,20 +52324,25 @@ class HttpRouteAction(proto.Message): Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (known as *end-of-stream*) up until the response has been - processed. Timeout includes all retries. If not specified, - this field uses the largest timeout among all backend - services associated with the route. Not supported when the - URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + processed. Timeout includes all retries. + + If not specified, this field uses the largest timeout among + all backend services associated with the route. + + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. This field is a member of `oneof`_ ``_timeout``. url_rewrite (google.cloud.compute_v1beta.types.UrlRewrite): The spec to modify the URL of the request, before forwarding the request to the matched - service. urlRewrite is the only action supported - in UrlMaps for classic Application Load - Balancers. Not supported when the URL map is - bound to a target gRPC proxy that has the + service. + + urlRewrite is the only action supported in + UrlMaps for classic Application Load Balancers. + + Not supported when the URL map is bound to a + target gRPC proxy that has the validateForProxyless field set to true. This field is a member of `oneof`_ ``_url_rewrite``. @@ -46011,10 +52352,11 @@ class HttpRouteAction(proto.Message): weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend - service, there must be one - weightedBackendService with weight set to a - non-zero number. After a backend service is - identified and before forwarding the request to + service, there must be oneweightedBackendService + with weight set to a non-zero number. + + After a backend service is identified and before + forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings @@ -46083,100 +52425,125 @@ class HttpRouteRule(proto.Message): Attributes: custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): customErrorResponsePolicy specifies how the Load Balancer - returns error responses when BackendServiceor BackendBucket - responds with an error. If a policy for an error code is not - configured for the RouteRule, a policy for the error code - configured in pathMatcher.defaultCustomErrorResponsePolicy - is applied. If one is not specified in - pathMatcher.defaultCustomErrorResponsePolicy, the policy + returns error responses when BackendServiceorBackendBucket + responds with an error. + + If a policy for an error code is not configured for the + RouteRule, a policy for the error code configured + inpathMatcher.defaultCustomErrorResponsePolicy is applied. + If one is not specified + inpathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes - effect. For example, consider a UrlMap with the following - configuration: - UrlMap.defaultCustomErrorResponsePolicy are - configured with policies for 5xx and 4xx errors - A - RouteRule for /coming_soon/ is configured for the error code - 404. If the request is for www.myotherdomain.com and a 404 - is encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - RouteRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. When used in conjunction with - routeRules.routeAction.retryPolicy, retries take precedence. - Only once all retries are exhausted, the - customErrorResponsePolicy is applied. While attempting a + effect. + + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy are configured + with policies for 5xx and 4xx errors + - A RouteRule for /coming_soon/ is configured for the + error code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in RouteRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + When used in conjunction + withrouteRules.routeAction.retryPolicy, retries take + precedence. Only once all retries are exhausted, + thecustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. + customErrorResponsePolicy is supported only for global external Application Load Balancers. This field is a member of `oneof`_ ``_custom_error_response_policy``. description (str): The short description conveying the intent of - this routeRule. The description can have a - maximum length of 1024 characters. + this routeRule. + + The description can have a maximum length of + 1024 characters. This field is a member of `oneof`_ ``_description``. header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need - to take effect for the selected backendService. The - headerAction value specified here is applied before the - matching pathMatchers[].headerAction and after - pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction + to take effect for the selected backendService. + + The headerAction value specified here is applied before the + matching pathMatchers[].headerAction and + afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction + HeaderAction is not supported for load balancers that have - their loadBalancingScheme set to EXTERNAL. Not supported - when the URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + their loadBalancingScheme set to EXTERNAL. + + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. This field is a member of `oneof`_ ``_header_action``. http_filter_configs (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): - Outbound route specific configuration for - networkservices.HttpFilter resources enabled by Traffic + Outbound route specific configuration + fornetworkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for load balancers - with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - ForwardingRule for more details. Not supported when the URL - map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See + ForwardingRule for more details. + + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. http_filter_metadata (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): - Outbound route specific metadata supplied to - networkservices.HttpFilter resources enabled by Traffic + Outbound route specific metadata supplied + tonetworkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for load balancers - with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - ForwardingRule for more details. The only configTypeUrl - supported is type.googleapis.com/google.protobuf.Struct Not - supported when the URL map is bound to a target gRPC proxy - that has validateForProxyless field set to true. + with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See + ForwardingRule for more details. + + The only configTypeUrl supported + istype.googleapis.com/google.protobuf.Struct + + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. match_rules (MutableSequence[google.cloud.compute_v1beta.types.HttpRouteRuleMatch]): The list of criteria for matching attributes - of a request to this routeRule. This list has OR + of a request to thisrouteRule. This list has OR semantics: the request matches this routeRule - when any of the matchRules are satisfied. - However predicates within a given matchRule have - AND semantics. All predicates within a matchRule + when any of thematchRules are satisfied. However + predicates within a given matchRule have AND + semantics. All predicates within a matchRule must match for the request to match the rule. priority (int): For routeRules within a given pathMatcher, priority determines the order in which a load - balancer interprets routeRules. RouteRules are + balancer interpretsrouteRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is - applied. You cannot configure two or more - routeRules with the same priority. Priority for - each rule must be set to a number from 0 to - 2147483647 inclusive. Priority numbers can have - gaps, which enable you to add or remove rules in - the future without affecting the rest of the - rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is - a valid series of priority numbers to which you - could add rules numbered from 6 to 8, 10 to 11, - and 13 to 15 in the future without any impact on - existing rules. + applied. + + You cannot configure two or more routeRules with + the same priority. Priority for each rule must + be set to a number from 0 to 2147483647 + inclusive. + + Priority numbers can have gaps, which enable you + to add or remove rules in the future without + affecting the rest of the rules. For example, 1, + 2, 3, 4, 5, 9, 12, 16 is a valid series of + priority numbers to which you could add rules + numbered from 6 to 8, 10 to 11, and 13 to 15 in + the future without any impact on existing rules. This field is a member of `oneof`_ ``_priority``. route_action (google.cloud.compute_v1beta.types.HttpRouteAction): @@ -46184,11 +52551,14 @@ class HttpRouteRule(proto.Message): balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected - backend. Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + URL maps for classic Application Load Balancers only support the urlRewrite action within a - route rule's routeAction. + route rule'srouteAction. This field is a member of `oneof`_ ``_route_action``. service (str): @@ -46197,16 +52567,19 @@ class HttpRouteRule(proto.Message): this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request - to the backend. Only one of urlRedirect, service - or routeAction.weightedBackendService can be - set. + to the backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. This field is a member of `oneof`_ ``_service``. url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): When this rule is matched, the request is redirected to a URL specified by urlRedirect. - Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + Not supported when the URL map is bound to a target gRPC proxy. @@ -46281,11 +52654,14 @@ class HttpRouteRuleMatch(proto.Message): full_path_match (str): For satisfying the matchRule condition, the path of the request must exactly match the value - specified in fullPathMatch after removing any + specified infullPathMatch after removing any query parameters and anchor that may be part of - the original URL. fullPathMatch must be from 1 - to 1024 characters. Only one of prefixMatch, - fullPathMatch or regexMatch must be specified. + the original URL. + + fullPathMatch must be from 1 to 1024 characters. + + Only one of prefixMatch, fullPathMatch or + regexMatch must be specified. This field is a member of `oneof`_ ``_full_path_match``. header_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderMatch]): @@ -46294,10 +52670,14 @@ class HttpRouteRuleMatch(proto.Message): the request. ignore_case (bool): Specifies that prefixMatch and fullPathMatch - matches are case sensitive. The default value is - false. ignoreCase must not be used with - regexMatch. Not supported when the URL map is - bound to a target gRPC proxy. + matches are case sensitive. + + The default value is false. + + ignoreCase must not be used with regexMatch. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_ignore_case``. metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): @@ -46306,37 +52686,50 @@ class HttpRouteRuleMatch(proto.Message): clients. In their xDS requests to the load balancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those - proxies. For each metadataFilter in this list, if its - filterMatchCriteria is set to MATCH_ANY, at least one of the - filterLabels must match the corresponding label provided in - the metadata. If its filterMatchCriteria is set to + proxies. + + For each metadataFilter in this list, if + itsfilterMatchCriteria is set to MATCH_ANY, at least one of + thefilterLabels must match the corresponding label provided + in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadata filters are specified, all of them need to be - satisfied in order to be considered a match. metadataFilters - specified here is applied after those specified in - ForwardingRule that refers to the UrlMap this - HttpRouteRuleMatch belongs to. metadataFilters only applies - to load balancers that have loadBalancingScheme set to - INTERNAL_SELF_MANAGED. Not supported when the URL map is - bound to a target gRPC proxy that has validateForProxyless - field set to true. + satisfied in order to be considered a match. + + metadataFilters specified here is applied after those + specified in ForwardingRule that refers to theUrlMap this + HttpRouteRuleMatch belongs to. + + metadataFilters only applies to load balancers that + haveloadBalancingScheme set toINTERNAL_SELF_MANAGED. + + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. path_template_match (str): If specified, the route is a pattern match expression that must match the :path header once the query string is - removed. A pattern match allows you to match - The value - must be between 1 and 1024 characters - The pattern must - start with a leading slash ("/") - There may be no more than - 5 operators in pattern Precisely one of prefix_match, - full_path_match, regex_match or path_template_match must be - set. + removed. + + A pattern match allows you to match + + :: + + - The value must be between 1 and 1024 characters + - The pattern must start with a leading slash ("/") + - There may be no more than 5 operators in pattern + + Precisely one ofprefix_match, full_path_match,regex_match or + path_template_match must be set. This field is a member of `oneof`_ ``_path_template_match``. prefix_match (str): For satisfying the matchRule condition, the request's path must begin with the specified - prefixMatch. prefixMatch must begin with a /. + prefixMatch.prefixMatch must begin with a /. + The value must be from 1 to 1024 characters. + Only one of prefixMatch, fullPathMatch or regexMatch must be specified. @@ -46344,16 +52737,20 @@ class HttpRouteRuleMatch(proto.Message): query_parameter_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpQueryParameterMatch]): Specifies a list of query parameter match criteria, all of which must match corresponding - query parameters in the request. Not supported - when the URL map is bound to a target gRPC - proxy. + query parameters in the request. + + Not supported when the URL map is bound to a + target gRPC proxy. regex_match (str): For satisfying the matchRule condition, the path of the - request must satisfy the regular expression specified in - regexMatch after removing any query parameters and anchor + request must satisfy the regular expression specified + inregexMatch after removing any query parameters and anchor supplied with the original URL. For more information about - regular expression syntax, see Syntax. Only one of - prefixMatch, fullPathMatch or regexMatch must be specified. + regular expression syntax, see Syntax. + + Only one of prefixMatch, fullPathMatch orregexMatch must be + specified. + Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. @@ -46405,9 +52802,10 @@ class HttpRouteRuleMatch(proto.Message): class Image(proto.Message): - r"""Represents an Image resource. You can use images to create - boot disks for your VM instances. For more information, read - Images. + r"""Represents an Image resource. + + You can use images to create boot disks for your VM instances. + For more information, read Images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -46425,7 +52823,7 @@ class Image(proto.Message): This field is a member of `oneof`_ ``_archive_size_bytes``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -46455,9 +52853,11 @@ class Image(proto.Message): image belongs. The image family name can be from a publicly managed image family provided by Compute Engine, or from a custom image family - you create. For example, centos-stream-9 is a + you create. For example,centos-stream-9 is a publicly available image family. For more - information, see Image family best practices. + information, see Image + family best practices. + When creating disks, you can specify an image family instead of a specific image name. The image family always returns its latest image @@ -46468,24 +52868,29 @@ class Image(proto.Message): guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): A list of features to enable on the guest operating system. Applicable only for bootable images. To see a list of - available options, see the guestOSfeatures[].type parameter. + available options, see theguestOSfeatures[].type parameter. id (int): [Output Only] The unique identifier for the resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the image using a customer-supplied - encryption key. After you encrypt an image with - a customer-supplied key, you must provide the - same key if you use the image later (e.g. to - create a disk from the image). Customer-supplied - encryption keys do not protect access to - metadata of the disk. If you do not provide an - encryption key when creating the image, then the - disk will be encrypted using an automatically - generated key and you do not need to provide a - key to use the image later. + Encrypts the image using acustomer-supplied + encryption key. + + After you encrypt an image with a + customer-supplied key, you must provide the same + key if you use the image later (e.g. to create a + disk from the image). + + Customer-supplied encryption keys do not protect + access to metadata of the disk. + + If you do not provide an encryption key when + creating the image, then the disk will be + encrypted using an automatically generated key + and you do not need to provide a key to use the + image later. This field is a member of `oneof`_ ``_image_encryption_key``. kind (str): @@ -46502,9 +52907,10 @@ class Image(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve an image. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an image. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): @@ -46521,28 +52927,42 @@ class Image(proto.Message): disk to prevent the proprietary data on the disk from being accessed unwantedly. The flag will be inherited by the disk created from the image. + The disk with locked flag set to true will be prohibited from performing the operations below: - - R/W or R/O disk attach - Disk detach, if disk - is created via create-on-create - Create images - - Create snapshots - Create disk clone (create - disk from the current disk) The image with the - locked field set to true will be prohibited from - performing the operations below: - Create images - from the current image - Update the locked field - for the current image The instance with at least - one disk with locked flag set to true will be - prohibited from performing the operations below: - - Secondary disk attach - Create instant - snapshot - Create machine images - Create - instance template - Delete the instance with - --keep-disk parameter set to true + + - R/W or R/O disk attach + - Disk detach, if disk is created via + create-on-create + - Create images + - Create snapshots + - Create disk clone (create disk from the + current disk) + + The image with the locked field set to true will + be prohibited from performing the operations + below: + + - Create images from the current image + - Update the locked field for the current + image + + The instance with at least one disk with locked + flag set to true will be prohibited from + performing the operations below: + + - Secondary disk attach + - Create instant snapshot + - Create machine images + - Create instance template + - Delete the instance with --keep-disk + parameter set to true This field is a member of `oneof`_ ``_locked``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -46568,11 +52988,13 @@ class Image(proto.Message): zonal image family reference. When the rollout policy does not include the user specified zone, or if the zone is rolled out, this image is - accessible. The rollout policy for this image is - read-only, except for allowlisted users. This - field might not be configured. To view the - latest non-deprecated image in a specific zone, - use the imageFamilyViews.get method. + accessible. + + The rollout policy for this image is read-only, + except for allowlisted users. This field might + not be configured. To view the latest + non-deprecated image in a specific zone, use + theimageFamilyViews.get method. This field is a member of `oneof`_ ``_rollout_override``. satisfies_pzi (bool): @@ -46595,21 +53017,27 @@ class Image(proto.Message): source_disk (str): URL of the source disk used to create this image. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk In order to create an - image, you must provide the full or partial URL - of one of the following: - The rawDisk.source - URL - The sourceDisk URL - The sourceImage URL - - The sourceSnapshot URL + values: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk + + In order to create an image, you must provide + the full or partial URL of one of the following: + + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL This field is a member of `oneof`_ ``_source_disk``. source_disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + Thecustomer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_source_disk_encryption_key``. source_disk_id (str): @@ -46621,14 +53049,23 @@ class Image(proto.Message): This field is a member of `oneof`_ ``_source_disk_id``. source_image (str): URL of the source image used to create this image. The - following are valid formats for the URL: - - https://www.googleapis.com/compute/v1/projects/project_id/global/ - images/image_name - - projects/project_id/global/images/image_name In order to - create an image, you must provide the full or partial URL of - one of the following: - The rawDisk.source URL - The - sourceDisk URL - The sourceImage URL - The sourceSnapshot - URL + following are valid formats for the URL: + + :: + + - https://www.googleapis.com/compute/v1/projects/project_id/global/ + images/image_name + - projects/project_id/global/images/image_name + + In order to create an image, you must provide the full or + partial URL of one of the following: + + :: + + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL This field is a member of `oneof`_ ``_source_image``. source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): @@ -46646,14 +53083,23 @@ class Image(proto.Message): This field is a member of `oneof`_ ``_source_image_id``. source_snapshot (str): URL of the source snapshot used to create this image. The - following are valid formats for the URL: - - https://www.googleapis.com/compute/v1/projects/project_id/global/ - snapshots/snapshot_name - - projects/project_id/global/snapshots/snapshot_name In order - to create an image, you must provide the full or partial URL - of one of the following: - The rawDisk.source URL - The - sourceDisk URL - The sourceImage URL - The sourceSnapshot - URL + following are valid formats for the URL: + + :: + + - https://www.googleapis.com/compute/v1/projects/project_id/global/ + snapshots/snapshot_name + - projects/project_id/global/snapshots/snapshot_name + + In order to create an image, you must provide the full or + partial URL of one of the following: + + :: + + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL This field is a member of `oneof`_ ``_source_snapshot``. source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): @@ -46681,7 +53127,7 @@ class Image(proto.Message): [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to - READY. Possible values are FAILED, PENDING, or READY. Check + READY. Possible values are FAILED, PENDING, orREADY. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -46694,6 +53140,7 @@ class Image(proto.Message): can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: + https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch """ @@ -46718,8 +53165,8 @@ class Architecture(proto.Enum): X86_64 = 425300551 class SourceType(proto.Enum): - r"""The type of the image used to create this disk. The default - and only valid value is RAW. + r"""The type of the image used to create this disk. The + default and only valid value is RAW. Values: UNDEFINED_SOURCE_TYPE (0): @@ -46735,7 +53182,7 @@ class Status(proto.Enum): r"""[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible - values are FAILED, PENDING, or READY. + values are FAILED, PENDING, orREADY. Values: UNDEFINED_STATUS (0): @@ -46995,7 +53442,7 @@ class ImageList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -47068,8 +53515,8 @@ class ImageParams(proto.Message): class InitialStateConfig(proto.Message): - r"""Initial State for shielded instance, these are public keys - which are safe to store in public + r"""Initial State for shielded instance, + these are public keys which are safe to store in public .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -47129,17 +53576,21 @@ class InsertAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47181,17 +53632,21 @@ class InsertAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -47235,17 +53690,21 @@ class InsertBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47283,17 +53742,21 @@ class InsertBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47330,15 +53793,18 @@ class InsertCrossSiteNetworkRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -47387,17 +53853,21 @@ class InsertDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_image (str): @@ -47451,17 +53921,21 @@ class InsertExternalVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47502,17 +53976,21 @@ class InsertFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47550,17 +54028,21 @@ class InsertFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47600,17 +54082,21 @@ class InsertForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47652,17 +54138,21 @@ class InsertFutureReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -47707,17 +54197,21 @@ class InsertGlobalAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47755,17 +54249,21 @@ class InsertGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47803,17 +54301,21 @@ class InsertGlobalNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47851,17 +54353,21 @@ class InsertGlobalPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47899,17 +54405,21 @@ class InsertHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -47951,17 +54461,21 @@ class InsertImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48004,22 +54518,27 @@ class InsertInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the managed instance group. + The name of the zone + where you want to create the managed instance + group. """ instance_group_manager_resource: "InstanceGroupManager" = proto.Field( @@ -48053,8 +54572,9 @@ class InsertInstanceGroupManagerResizeRequestRequest(proto.Message): Attributes: instance_group_manager (str): The name of the managed instance group to - which the resize request will be added. Name - should conform to RFC1035 or be a resource ID. + which the resize request will be added. + Name should conform to RFC1035 or be a resource + ID. instance_group_manager_resize_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest): The body resource for this request project (str): @@ -48064,21 +54584,25 @@ class InsertInstanceGroupManagerResizeRequestRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. @@ -48125,22 +54649,26 @@ class InsertInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the instance group. + The name of the zone + where you want to create the instance group. """ instance_group_resource: "InstanceGroup" = proto.Field( @@ -48180,40 +54708,52 @@ class InsertInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_instance_template (str): Specifies instance template to create the - instance. This field is optional. It can be a - full or partial URL. For example, the following - are all valid URLs to an instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate + instance. + This field is optional. It can be a full or + partial URL. For example, the following are all + valid URLs to an instance template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate This field is a member of `oneof`_ ``_source_instance_template``. source_machine_image (str): Specifies the machine image to use to create - the instance. This field is optional. It can be - a full or partial URL. For example, the - following are all valid URLs to a machine image: - - - https://www.googleapis.com/compute/v1/projects/project/global/global - /machineImages/machineImage - - projects/project/global/global/machineImages/machineImage - - global/machineImages/machineImage + the instance. + This field is optional. It can be a full or + partial URL. For example, the following are all + valid URLs to a machine image: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage + - + projects/project/global/global/machineImages/machineImage + - global/machineImages/machineImage This field is a member of `oneof`_ ``_source_machine_image``. zone (str): @@ -48267,17 +54807,21 @@ class InsertInstanceTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48315,17 +54859,21 @@ class InsertInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -48368,15 +54916,18 @@ class InsertInterconnectAttachmentGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -48417,17 +54968,21 @@ class InsertInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. validate_only (bool): @@ -48477,15 +55032,18 @@ class InsertInterconnectGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -48524,17 +55082,21 @@ class InsertInterconnectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48572,17 +55134,21 @@ class InsertLicenseRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48620,17 +55186,21 @@ class InsertMachineImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_instance (str): @@ -48679,15 +55249,18 @@ class InsertNetworkAttachmentRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -48732,17 +55305,21 @@ class InsertNetworkEdgeSecurityServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. validate_only (bool): @@ -48793,23 +55370,27 @@ class InsertNetworkEndpointGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the network endpoint group. It should comply - with RFC1035. + The name of the zone where + you want to create the network endpoint group. + It should comply with RFC1035. """ network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( @@ -48849,17 +55430,21 @@ class InsertNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48897,17 +55482,21 @@ class InsertNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -48947,17 +55536,21 @@ class InsertNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -49007,17 +55600,21 @@ class InsertNodeTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49062,17 +55659,21 @@ class InsertOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): @@ -49115,17 +55716,21 @@ class InsertPacketMirroringRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49167,17 +55772,21 @@ class InsertPublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49217,17 +55826,21 @@ class InsertPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49271,17 +55884,21 @@ class InsertRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49306,6 +55923,64 @@ class InsertRegionAutoscalerRequest(proto.Message): ) +class InsertRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + backend_bucket_resource: "BackendBucket" = proto.Field( + proto.MESSAGE, + number=380757784, + message="BackendBucket", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class InsertRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.Insert. See the method description for details. @@ -49325,17 +56000,21 @@ class InsertRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49379,17 +56058,21 @@ class InsertRegionCommitmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49414,6 +56097,64 @@ class InsertRegionCommitmentRequest(proto.Message): ) +class InsertRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Insert. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + composite_health_check_resource: "CompositeHealthCheck" = proto.Field( + proto.MESSAGE, + number=132195824, + message="CompositeHealthCheck", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class InsertRegionDiskRequest(proto.Message): r"""A request message for RegionDisks.Insert. See the method description for details. @@ -49433,17 +56174,21 @@ class InsertRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. source_image (str): @@ -49478,6 +56223,64 @@ class InsertRegionDiskRequest(proto.Message): ) +class InsertRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Insert. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_aggregation_policy_resource: "HealthAggregationPolicy" = proto.Field( + proto.MESSAGE, + number=293526971, + message="HealthAggregationPolicy", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class InsertRegionHealthCheckRequest(proto.Message): r"""A request message for RegionHealthChecks.Insert. See the method description for details. @@ -49497,17 +56300,21 @@ class InsertRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49551,17 +56358,21 @@ class InsertRegionHealthCheckServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49605,17 +56416,21 @@ class InsertRegionHealthSourceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49659,17 +56474,21 @@ class InsertRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49712,24 +56531,29 @@ class InsertRegionInstanceGroupManagerResizeRequestRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. Name - should conform to RFC1035. + Name of the region + scoping this request. Name should conform to + RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49777,17 +56601,21 @@ class InsertRegionInstanceTemplateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49831,17 +56659,21 @@ class InsertRegionInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49885,17 +56717,21 @@ class InsertRegionMultiMigRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents you from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents you from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49933,25 +56769,29 @@ class InsertRegionNetworkEndpointGroupRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where you want to - create the network endpoint group. It should - comply with RFC1035. + The name of the region where + you want to create the network endpoint group. + It should comply with RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -49995,17 +56835,21 @@ class InsertRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -50049,17 +56893,21 @@ class InsertRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -50103,17 +56951,21 @@ class InsertRegionNotificationEndpointRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -50155,17 +57007,21 @@ class InsertRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): @@ -50218,17 +57074,21 @@ class InsertRegionSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): @@ -50272,17 +57132,21 @@ class InsertRegionSslCertificateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): @@ -50326,17 +57190,21 @@ class InsertRegionSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): @@ -50380,17 +57248,21 @@ class InsertRegionTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): @@ -50434,17 +57306,21 @@ class InsertRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): @@ -50488,17 +57364,21 @@ class InsertRegionTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): @@ -50581,17 +57461,21 @@ class InsertReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation_resource (google.cloud.compute_v1beta.types.Reservation): @@ -50637,17 +57521,21 @@ class InsertResourcePolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource_policy_resource (google.cloud.compute_v1beta.types.ResourcePolicy): @@ -50689,17 +57577,21 @@ class InsertRouteRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route_resource (google.cloud.compute_v1beta.types.Route): @@ -50739,17 +57631,21 @@ class InsertRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router_resource (google.cloud.compute_v1beta.types.Router): @@ -50791,17 +57687,21 @@ class InsertSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): @@ -50850,17 +57750,21 @@ class InsertServiceAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. service_attachment_resource (google.cloud.compute_v1beta.types.ServiceAttachment): @@ -50902,17 +57806,21 @@ class InsertSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): @@ -50950,17 +57858,21 @@ class InsertSslCertificateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): @@ -50998,17 +57910,21 @@ class InsertSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): @@ -51046,17 +57962,21 @@ class InsertStoragePoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. storage_pool_resource (google.cloud.compute_v1beta.types.StoragePool): @@ -51102,17 +58022,21 @@ class InsertSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork_resource (google.cloud.compute_v1beta.types.Subnetwork): @@ -51154,17 +58078,21 @@ class InsertTargetGrpcProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_grpc_proxy_resource (google.cloud.compute_v1beta.types.TargetGrpcProxy): @@ -51202,17 +58130,21 @@ class InsertTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): @@ -51250,17 +58182,21 @@ class InsertTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): @@ -51298,17 +58234,21 @@ class InsertTargetInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_instance_resource (google.cloud.compute_v1beta.types.TargetInstance): @@ -51354,17 +58294,21 @@ class InsertTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool_resource (google.cloud.compute_v1beta.types.TargetPool): @@ -51406,17 +58350,21 @@ class InsertTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxy_resource (google.cloud.compute_v1beta.types.TargetSslProxy): @@ -51454,17 +58402,21 @@ class InsertTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): @@ -51504,17 +58456,21 @@ class InsertTargetVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_vpn_gateway_resource (google.cloud.compute_v1beta.types.TargetVpnGateway): @@ -51556,17 +58512,21 @@ class InsertUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map_resource (google.cloud.compute_v1beta.types.UrlMap): @@ -51606,17 +58566,21 @@ class InsertVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. vpn_gateway_resource (google.cloud.compute_v1beta.types.VpnGateway): @@ -51660,17 +58624,21 @@ class InsertVpnTunnelRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. vpn_tunnel_resource (google.cloud.compute_v1beta.types.VpnTunnel): @@ -51713,15 +58681,18 @@ class InsertWireGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -51759,10 +58730,69 @@ class InsertWireGroupRequest(proto.Message): ) +class InsertZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + vm_extension_policy_resource: "VmExtensionPolicy" = proto.Field( + proto.MESSAGE, + number=515669235, + message="VmExtensionPolicy", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class Instance(proto.Message): - r"""Represents an Instance resource. An instance is a virtual - machine that is hosted on Google Cloud Platform. For more - information, read Virtual Machine Instances. + r"""Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud + Platform. For more information, readVirtual Machine Instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -51778,7 +58808,7 @@ class Instance(proto.Message): packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more - information, see Enabling IP Forwarding . + information, seeEnabling IP Forwarding. This field is a member of `oneof`_ ``_can_ip_forward``. confidential_instance_config (google.cloud.compute_v1beta.types.ConfidentialInstanceConfig): @@ -51789,7 +58819,7 @@ class Instance(proto.Message): This field is a member of `oneof`_ ``_cpu_platform``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deletion_protection (bool): @@ -51825,8 +58855,10 @@ class Instance(proto.Message): Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to - update the instance. To see the latest - fingerprint, make get() request to the instance. + update the instance. + + To see the latest fingerprint, make get() + request to the instance. This field is a member of `oneof`_ ``_fingerprint``. guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): @@ -51849,13 +58881,16 @@ class Instance(proto.Message): This field is a member of `oneof`_ ``_id``. instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): Encrypts suspended data for an instance with - a customer-managed encryption key. If you are - creating a new instance, this field will encrypt - the local SSD and in-memory contents of the - instance during the suspend operation. If you do - not provide an encryption key when creating the - instance, then the local SSD and in-memory - contents will be encrypted using an + acustomer-managed encryption key. + + If you are creating a new instance, this field + will encrypt the local SSD and in-memory + contents of the instance during the suspend + operation. + + If you do not provide an encryption key when + creating the instance, then the local SSD and + in-memory contents will be encrypted using an automatically generated key during the suspend operation. @@ -51881,66 +58916,75 @@ class Instance(proto.Message): changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change - labels. To see the latest fingerprint, make - get() request to the instance. + labels. + + To see the latest fingerprint, make get() + request to the instance. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this instance. These can be later modified by the setLabels method. last_start_timestamp (str): - [Output Only] Last start timestamp in RFC3339 text format. + [Output Only] Last start timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_last_start_timestamp``. last_stop_timestamp (str): - [Output Only] Last stop timestamp in RFC3339 text format. + [Output Only] Last stop timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_last_stop_timestamp``. last_suspended_timestamp (str): - [Output Only] Last suspended timestamp in RFC3339 text + [Output Only] Last suspended timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_last_suspended_timestamp``. machine_type (str): Full or partial URL of the machine type resource to use for this instance, in the - format: zones/zone/machineTypes/machine-type. + format:zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a - valid partial url to a predefined machine type: + valid partial url to a predefined + machine type: + zones/us-central1-f/machineTypes/n1-standard-1 - To create a custom machine type, provide a URL - to a machine type in the following format, where - CPUS is 1 or an even number up to 32 (2, 4, 6, - ... 24, etc), and MEMORY is the total memory for - this instance. Memory must be a multiple of 256 - MB and must be supplied in MB (e.g. 5 GB of - memory is 5120 MB): - zones/zone/machineTypes/custom-CPUS-MEMORY For - example: + + To create acustom + machine type, provide a URL to a machine type in + the following format, where CPUS is 1 or an even + number up to 32 (2, 4, 6, ... 24, etc), and + MEMORY is the total + memory for this instance. Memory must be a + multiple of 256 MB and must be supplied in MB + (e.g. 5 GB of memory is 5120 MB): + + zones/zone/machineTypes/custom-CPUS-MEMORY + + For example: zones/us-central1-f/machineTypes/custom-4-5120 - For a full list of restrictions, read the - Specifications for custom machine types. + For a full list of restrictions, read + theSpecifications for custom machine types. This field is a member of `oneof`_ ``_machine_type``. metadata (google.cloud.compute_v1beta.types.Metadata): - The metadata key/value pairs assigned to this - instance. This includes metadata keys that were - explicitly defined for the instance. + The metadata key/value pairs assigned + to this instance. This includes metadata keys + that were explicitly defined for the instance. This field is a member of `oneof`_ ``_metadata``. min_cpu_platform (str): - Specifies a minimum CPU platform for the VM - instance. Applicable values are the friendly - names of CPU platforms, such as minCpuPlatform: - "Intel Haswell" or minCpuPlatform: "Intel Sandy + Specifies aminimum CPU + platform for the VM instance. Applicable values + are the friendly names of CPU platforms, such as + minCpuPlatform: "Intel Haswell" or + minCpuPlatform: "Intel Sandy Bridge". This field is a member of `oneof`_ ``_min_cpu_platform``. name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -52012,11 +59056,13 @@ class Instance(proto.Message): A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is - supported. Service accounts generate access - tokens that can be accessed through the metadata - server and used to authenticate applications on - the instance. See Service Accounts for more - information. + supported. + + Service accounts generate access tokens that can + be accessed through the metadata server and used + to authenticate applications on the instance. + SeeService Accounts + for more information. shielded_instance_config (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): This field is a member of `oneof`_ ``_shielded_instance_config``. @@ -52047,8 +59093,8 @@ class Instance(proto.Message): This field is a member of `oneof`_ ``_start_restricted``. status (str): [Output Only] The status of the instance. One of the - following values: PROVISIONING, STAGING, RUNNING, STOPPING, - SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more + following values: PROVISIONING, STAGING,RUNNING, STOPPING, + SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about the status of the instance, see Instance life cycle. Check the Status enum for the list of possible values. @@ -52065,7 +59111,7 @@ class Instance(proto.Message): firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within - the list must comply with RFC1035. Multiple tags + the list must comply withRFC1035. Multiple tags can be specified via the 'tags.items' field. This field is a member of `oneof`_ ``_tags``. @@ -52150,9 +59196,9 @@ class PrivateIpv6GoogleAccess(proto.Enum): class Status(proto.Enum): r"""[Output Only] The status of the instance. One of the following - values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, - SUSPENDED, REPAIRING, and TERMINATED. For more information about the - status of the instance, see Instance life cycle. + values: PROVISIONING, STAGING,RUNNING, STOPPING, + SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information + about the status of the instance, see Instance life cycle. Values: UNDEFINED_STATUS (0): @@ -52493,15 +59539,15 @@ class InstanceAggregatedList(proto.Message): An object that contains a list of instances scoped by zone. kind (str): - [Output Only] Type of resource. Always - compute#instanceAggregatedList for aggregated lists of + [Output Only] Type of resource. + Alwayscompute#instanceAggregatedList for aggregated lists of Instance resources. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -52641,15 +59687,24 @@ class InstanceConsumptionInfo(proto.Message): class InstanceGroup(proto.Message): - r"""Represents an Instance Group resource. Instance Groups can be - used to configure a target for load balancing. Instance groups - can either be managed or unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource instead. Use zonal unmanaged - instance groups if you need to apply load balancing to groups of - heterogeneous instances or if you need to manage the instances - yourself. You cannot create regional unmanaged instance groups. - For more information, read Instance groups. + r"""Represents an Instance Group resource. + + Instance Groups can be used to configure a target forload + balancing. + + Instance groups can either be managed or unmanaged. + + To create + managed instance groups, use the instanceGroupManager + orregionInstanceGroupManager resource instead. + + Use zonal unmanaged instance groups if you need to applyload + balancing to groups of heterogeneous instances or if you need to + manage the instances yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -52657,7 +59712,7 @@ class InstanceGroup(proto.Message): Attributes: creation_timestamp (str): [Output Only] The creation timestamp for this instance group - in RFC3339 text format. + inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -52678,24 +59733,25 @@ class InstanceGroup(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroup for instance groups. + [Output Only] The resource type, which is + alwayscompute#instanceGroup for instance groups. This field is a member of `oneof`_ ``_kind``. name (str): The name of the instance group. The name must - be 1-63 characters long, and comply with - RFC1035. + be 1-63 characters long, and comply withRFC1035. This field is a member of `oneof`_ ``_name``. named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - Optional. Assigns a name to a port number. For example: - {name: "http", port: 80} This allows the system to reference - ports by the assigned name instead of a port number. Named - ports can also contain multiple ports. For example: [{name: - "app1", port: 8080}, {name: "app1", port: 8081}, {name: - "app2", port: 8082}] Named ports apply to all instances in - this instance group. + Optional. Assigns a name to a port number. For + example:{name: "http", port: 80} + + This allows the system to reference ports by the assigned + name instead of a port number. Named ports can also contain + multiple ports. For example:[{name: "app1", port: 8080}, + {name: "app1", port: 8081}, {name: "app2", port: 8082}] + + Named ports apply to all instances in this instance group. network (str): [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple @@ -52705,7 +59761,7 @@ class InstanceGroup(proto.Message): This field is a member of `oneof`_ ``_network``. region (str): - [Output Only] The URL of the region where the instance group + [Output Only] The URL of theregion where the instance group is located (for regional resources). This field is a member of `oneof`_ ``_region``. @@ -52728,8 +59784,8 @@ class InstanceGroup(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. zone (str): - [Output Only] The URL of the zone where the instance group - is located (for zonal resources). + [Output Only] The URL of thezone where the instance group is + located (for zonal resources). This field is a member of `oneof`_ ``_zone``. """ @@ -52815,15 +59871,15 @@ class InstanceGroupAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupsScopedList]): A list of InstanceGroupsScopedList resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupAggregatedList for aggregated lists of - instance groups. + [Output Only] The resource type, which is + alwayscompute#instanceGroupAggregatedList for aggregated + lists of instance groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -52897,14 +59953,14 @@ class InstanceGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): A list of InstanceGroup resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupList for instance group lists. + [Output Only] The resource type, which is + alwayscompute#instanceGroupList for instance group lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -52958,12 +60014,17 @@ def raw_page(self): class InstanceGroupManager(proto.Message): - r"""Represents a Managed Instance Group resource. An instance - group is a collection of VM instances that you can manage as a - single entity. For more information, read Instance groups. For - zonal Managed Instance Group, use the instanceGroupManagers - resource. For regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + r"""Represents a Managed Instance Group resource. + + An instance group is a collection of VM instances that you can + manage as a single entity. For more information, readInstance + groups. + + For zonal Managed Instance Group, use the instanceGroupManagers + resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -52981,6 +60042,7 @@ class InstanceGroupManager(proto.Message): The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. + When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers @@ -52994,7 +60056,7 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_base_instance_name``. creation_timestamp (str): [Output Only] The creation timestamp for this managed - instance group in RFC3339 text format. + instance group inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. current_actions (google.cloud.compute_v1beta.types.InstanceGroupManagerActionsSummary): @@ -53015,7 +60077,7 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_distribution_policy``. failover_action (str): The action to perform in case of zone failure. Only one - value is supported, NO_FAILOVER. The default is NO_FAILOVER. + value is supported,NO_FAILOVER. The default is NO_FAILOVER. Check the FailoverAction enum for the list of possible values. @@ -53026,10 +60088,11 @@ class InstanceGroupManager(proto.Message): ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, - otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - InstanceGroupManager. + otherwise the request will fail with error412 + conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an InstanceGroupManager. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -53039,9 +60102,9 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_id``. instance_flexibility_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicy): Instance flexibility allowing MIG to create - VMs from multiple types of machines. Instance - flexibility configuration on MIG overrides - instance template configuration. + VMs from multiple types of machines. + Instance flexibility configuration on MIG + overrides instance template configuration. This field is a member of `oneof`_ ``_instance_flexibility_policy``. instance_group (str): @@ -53059,14 +60122,15 @@ class InstanceGroupManager(proto.Message): group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do - not change unless you run recreateInstances, run - applyUpdatesToInstances, or set the group's - updatePolicy.type to PROACTIVE. + not change unless you run recreateInstances, + runapplyUpdatesToInstances, or set the + group'supdatePolicy.type to PROACTIVE. This field is a member of `oneof`_ ``_instance_template``. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManager for managed instance groups. + [Output Only] The resource type, which is + alwayscompute#instanceGroupManager for managed instance + groups. This field is a member of `oneof`_ ``_kind``. list_managed_instances_results (str): @@ -53085,7 +60149,7 @@ class InstanceGroupManager(proto.Message): name (str): The name of the managed instance group. The name must be 1-63 characters long, and comply - with RFC1035. + withRFC1035. This field is a member of `oneof`_ ``_name``. named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): @@ -53098,7 +60162,7 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_params``. region (str): - [Output Only] The URL of the region where the managed + [Output Only] The URL of theregion where the managed instance group resides (for regional resources). This field is a member of `oneof`_ ``_region``. @@ -53147,7 +60211,7 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_status``. target_pools (MutableSequence[str]): The URLs for all TargetPool resources to - which instances in the instanceGroup field are + which instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. @@ -53167,20 +60231,25 @@ class InstanceGroupManager(proto.Message): target_stopped_size (int): The target number of stopped instances for this managed instance group. This number changes - when you: - Stop instance using the - stopInstances method or start instances using - the startInstances method. - Manually change the - targetStoppedSize using the update method. + when you: + + - Stop instance using the stopInstances + method or start instances using the + startInstances method. + - Manually change the targetStoppedSize using + the update method. This field is a member of `oneof`_ ``_target_stopped_size``. target_suspended_size (int): The target number of suspended instances for this managed instance group. This number changes - when you: - Suspend instance using the - suspendInstances method or resume instances - using the resumeInstances method. - Manually - change the targetSuspendedSize using the update - method. + when you: + + - Suspend instance using the suspendInstances + method or resume instances using the + resumeInstances method. + - Manually change the targetSuspendedSize + using the update method. This field is a member of `oneof`_ ``_target_suspended_size``. update_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerUpdatePolicy): @@ -53190,18 +60259,19 @@ class InstanceGroupManager(proto.Message): This field is a member of `oneof`_ ``_update_policy``. versions (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerVersion]): Specifies the instance templates used by this - managed instance group to create instances. Each - version is defined by an instanceTemplate and a - name. Every version can appear at most once per - instance group. This field overrides the + managed instance group to create instances. + + Each version is defined by an instanceTemplate + and aname. Every version can appear at most once + per instance group. This field overrides the top-level instanceTemplate field. Read more - about the relationships between these fields. - Exactly one version must leave the targetSize - field unset. That version will be applied to all - remaining instances. For more information, read - about canary updates. + about therelationships + between these fields. Exactly one version must + leave thetargetSize field unset. That version + will be applied to all remaining instances. For + more information, read aboutcanary updates. zone (str): - [Output Only] The URL of a zone where the managed instance + [Output Only] The URL of azone where the managed instance group is located (for zonal resources). This field is a member of `oneof`_ ``_zone``. @@ -53209,7 +60279,7 @@ class InstanceGroupManager(proto.Message): class FailoverAction(proto.Enum): r"""The action to perform in case of zone failure. Only one value is - supported, NO_FAILOVER. The default is NO_FAILOVER. + supported,NO_FAILOVER. The default is NO_FAILOVER. Values: UNDEFINED_FAILOVER_ACTION (0): @@ -53234,7 +60304,7 @@ class ListManagedInstancesResults(proto.Enum): set. PAGELESS (32183464): (Default) Pagination is disabled for the - group's listManagedInstances API method. + group'slistManagedInstances API method. maxResults and pageToken query parameters are ignored and all instances are returned in a single response. @@ -53469,9 +60539,11 @@ class InstanceGroupManagerActionsSummary(proto.Message): instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the - instance successfully. If you have disabled creation - retries, this field will not be populated; instead, the - creatingWithoutRetries field will be populated. + instance successfully. + + If you have disabled creation retries, this field will not + be populated; instead, the creatingWithoutRetries field will + be populated. This field is a member of `oneof`_ ``_creating``. creating_without_retries (int): @@ -53631,15 +60703,15 @@ class InstanceGroupManagerAggregatedList(proto.Message): A list of InstanceGroupManagersScopedList resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerAggregatedList for an aggregated - list of managed instance groups. + [Output Only] The resource type, which is + alwayscompute#instanceGroupManagerAggregatedList for an + aggregated list of managed instance groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -53707,11 +60779,12 @@ class InstanceGroupManagerAllInstancesConfig(proto.Message): Attributes: properties (google.cloud.compute_v1beta.types.InstancePropertiesPatch): Properties to set on all instances in the - group. You can add or modify properties using - the instanceGroupManagers.patch or - regionInstanceGroupManagers.patch. After setting - allInstancesConfig on the group, you must update - the group's instances to apply the + group. + You can add or modify properties using + theinstanceGroupManagers.patch + orregionInstanceGroupManagers.patch. After + settingallInstancesConfig on the group, you must + update the group's instances to apply the configuration. To apply the configuration, set the group's updatePolicy.type field to use proactive updates or use the @@ -53881,7 +60954,7 @@ class InstanceGroupManagerInstanceLifecyclePolicy(proto.Message): the same action also applies to the VMs on which your application fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed VM by - recreating it. For more information, see About repairing VMs + recreating it. For more information, seeAbout repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM. Check the DefaultActionOnFailure enum for the list of possible values. @@ -53890,26 +60963,38 @@ class InstanceGroupManagerInstanceLifecyclePolicy(proto.Message): force_update_on_repair (str): A bit indicating whether to forcefully apply the group's latest configuration when repairing - a VM. Valid options are: - NO (default): If - configuration updates are available, they are - not forcefully applied during repair. Instead, - configuration updates are applied according to - the group's update policy. - YES: If - configuration updates are available, they are - applied during repair. Check the - ForceUpdateOnRepair enum for the list of - possible values. + a VM. Valid options are: + + + + - NO (default): If configuration updates + are available, they are not forcefully + applied during repair. Instead, configuration + updates are applied according to the + group's update policy. + + - YES: If configuration updates are + available, they are applied during + repair. + Check the ForceUpdateOnRepair enum for the list + of possible values. This field is a member of `oneof`_ ``_force_update_on_repair``. on_failed_health_check (str): The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM - fails a health check. Valid values are: - DEFAULT_ACTION - (default): MIG uses the same action configured for - instanceLifecyclePolicy.defaultActionOnFailure field. - - REPAIR: MIG automatically repairs an unhealthy VM by - recreating it. - DO_NOTHING: MIG doesn't repair an unhealthy - VM. For more information, see About repairing VMs in a MIG. + fails a health check. Valid values are: + + :: + + - DEFAULT_ACTION (default): MIG uses the same action + configured for instanceLifecyclePolicy.defaultActionOnFailure field. + - REPAIR: MIG automatically repairs an unhealthy VM by + recreating it. + - DO_NOTHING: MIG doesn't repair an unhealthy VM. + For more information, see + About repairing VMs in a MIG. + Check the OnFailedHealthCheck enum for the list of possible values. @@ -53925,10 +61010,10 @@ class DefaultActionOnFailure(proto.Enum): onFailedHealthCheck field is ``DEFAULT_ACTION``, then the same action also applies to the VMs on which your application fails a health check. Valid values are - REPAIR (default): MIG automatically - repairs a failed VM by recreating it. For more information, see - About repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a - failed VM. Additional supported values which may be not listed in - the enum directly due to technical reasons: DO_NOTHING REPAIR + repairs a failed VM by recreating it. For more information, seeAbout + repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed + VM. Additional supported values which may be not listed in the enum + directly due to technical reasons: DO_NOTHING REPAIR Values: UNDEFINED_DEFAULT_ACTION_ON_FAILURE (0): @@ -53950,12 +61035,17 @@ class DefaultActionOnFailure(proto.Enum): class ForceUpdateOnRepair(proto.Enum): r"""A bit indicating whether to forcefully apply the group's - latest configuration when repairing a VM. Valid options are: - - NO (default): If configuration updates are available, they are - not forcefully applied during repair. Instead, configuration - updates are applied according to the group's update policy. - - YES: If configuration updates are available, they are applied - during repair. + latest configuration when repairing a VM. Valid options are: + + + + - NO (default): If configuration updates are available, + they are not forcefully applied during repair. Instead, + configuration updates are applied according to the + group's update policy. + + - YES: If configuration updates are available, they are + applied during repair. Values: UNDEFINED_FORCE_UPDATE_ON_REPAIR (0): @@ -53973,14 +61063,20 @@ class ForceUpdateOnRepair(proto.Enum): class OnFailedHealthCheck(proto.Enum): r"""The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health - check. Valid values are: - DEFAULT_ACTION (default): MIG uses the - same action configured for - instanceLifecyclePolicy.defaultActionOnFailure field. - REPAIR: MIG - automatically repairs an unhealthy VM by recreating it. - - DO_NOTHING: MIG doesn't repair an unhealthy VM. For more - information, see About repairing VMs in a MIG. Additional supported - values which may be not listed in the enum directly due to technical - reasons: DO_NOTHING REPAIR + check. Valid values are: + + :: + + - DEFAULT_ACTION (default): MIG uses the same action + configured for instanceLifecyclePolicy.defaultActionOnFailure field. + - REPAIR: MIG automatically repairs an unhealthy VM by + recreating it. + - DO_NOTHING: MIG doesn't repair an unhealthy VM. + For more information, see + About repairing VMs in a MIG. + + Additional supported values which may be not listed in the enum + directly due to technical reasons: DO_NOTHING REPAIR Values: UNDEFINED_ON_FAILED_HEALTH_CHECK (0): @@ -54026,16 +61122,26 @@ class InstanceGroupManagerInstanceLifecyclePolicyOnRepair(proto.Message): Attributes: allow_changing_zone (str): Specifies whether the MIG can change a VM's - zone during a repair. Check the - AllowChangingZone enum for the list of possible - values. + zone during a repair. Valid values are: + + - NO (default): MIG cannot change a VM's zone + during a repair. + - YES: MIG can select a different zone for + the VM during a repair. + Check the AllowChangingZone enum for the list of + possible values. This field is a member of `oneof`_ ``_allow_changing_zone``. """ class AllowChangingZone(proto.Enum): r"""Specifies whether the MIG can change a VM's zone during a - repair. + repair. Valid values are: + + - NO (default): MIG cannot change a VM's zone during a + repair. + - YES: MIG can select a different zone for the VM during a + repair. Values: UNDEFINED_ALLOW_CHANGING_ZONE (0): @@ -54080,7 +61186,7 @@ class InstanceGroupManagerList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -54143,7 +61249,7 @@ class InstanceGroupManagerParams(proto.Message): instance group. The tags are key-value pairs. Keys must be in the format tagKeys/123 and values in the format tagValues/456. For more - information, see Manage tags for resources. + information, seeManage tags for resources. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -54171,7 +61277,7 @@ class InstanceGroupManagerResizeRequest(proto.Message): This field is a member of `oneof`_ ``_count``. creation_timestamp (str): [Output Only] The creation timestamp for this resize request - in RFC3339 text format. + inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -54190,20 +61296,20 @@ class InstanceGroupManagerResizeRequest(proto.Message): increased by this number. This field cannot be used together with 'resize_by'. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerResizeRequest for resize + [Output Only] The resource type, which is + alwayscompute#instanceGroupManagerResizeRequest for resize requests. This field is a member of `oneof`_ ``_kind``. name (str): The name of this resize request. The name - must be 1-63 characters long, and comply with - RFC1035. + must be 1-63 characters long, and comply + withRFC1035. This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] The URL of a region where the resize request - is located. Populated only for regional resize requests. + [Output Only] The URL of aregion where the resize request is + located. Populated only for regional resize requests. This field is a member of `oneof`_ ``_region``. requested_run_duration (google.cloud.compute_v1beta.types.Duration): @@ -54239,7 +61345,7 @@ class InstanceGroupManagerResizeRequest(proto.Message): This field is a member of `oneof`_ ``_status``. zone (str): - [Output Only] The URL of a zone where the resize request is + [Output Only] The URL of azone where the resize request is located. Populated only for zonal resize requests. This field is a member of `oneof`_ ``_zone``. @@ -54443,15 +61549,15 @@ class InstanceGroupManagerResizeRequestsListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): A list of resize request resources. kind (str): - [Output Only] Type of the resource. Always - compute#instanceGroupManagerResizeRequestList for a list of - resize requests. + [Output Only] Type of the resource. + Alwayscompute#instanceGroupManagerResizeRequestList for a + list of resize requests. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -54512,14 +61618,18 @@ class InstanceGroupManagerResourcePolicies(proto.Message): Attributes: workload_policy (str): The URL of the workload policy that is - specified for this managed instance group. It - can be a full or partial URL. For example, the - following are all valid URLs to a workload - policy: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + specified for this managed instance group. + It can be a full or partial URL. For example, + the following are all valid URLs to a workload + policy: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + - + projects/project/regions/region/resourcePolicies/resourcePolicy + - + regions/region/resourcePolicies/resourcePolicy This field is a member of `oneof`_ ``_workload_policy``. """ @@ -54600,7 +61710,7 @@ class InstanceGroupManagerStatus(proto.Message): This field is a member of `oneof`_ ``_all_instances_config``. autoscaler (str): - [Output Only] The URL of the Autoscaler that targets this + [Output Only] The URL of theAutoscaler that targets this instance group manager. This field is a member of `oneof`_ ``_autoscaler``. @@ -54850,7 +61960,7 @@ class InstanceGroupManagerStatusVersionTarget(proto.Message): [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target - version are specified by version field on Instance Group + version are specified byversion field on Instance Group Manager. This field is a member of `oneof`_ ``_is_reached``. @@ -54920,28 +62030,31 @@ class InstanceGroupManagerUpdatePolicy(proto.Message): Attributes: instance_redistribution_type (str): - The instance redistribution policy for - regional managed instance groups. Valid values - are: - PROACTIVE (default): The group attempts - to maintain an even distribution of VM instances - across zones in the region. - NONE: For - non-autoscaled groups, proactive redistribution - is disabled. Check the - InstanceRedistributionType enum for the list of - possible values. + The + instance redistribution policy for regional + managed instance groups. Valid values are: + + - PROACTIVE (default): The group attempts to + maintain an even distribution of VM + instances across zones in the region. + - NONE: For non-autoscaled groups, proactive + redistribution is disabled. + Check the InstanceRedistributionType enum for + the list of possible values. This field is a member of `oneof`_ ``_instance_redistribution_type``. max_surge (google.cloud.compute_v1beta.types.FixedOrPercent): The maximum number of instances that can be - created above the specified targetSize during - the update process. This value can be either a - fixed number or, if the group has 10 or more + created above the specifiedtargetSize during the + update process. This value can be either a fixed + number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded - if necessary. The default value for maxSurge is + if necessary. The default value for maxSurge is a fixed value equal to the number of zones in - which the managed instance group operates. At - least one of either maxSurge or maxUnavailable + which the managed instance group operates. + + At least one of either maxSurge ormaxUnavailable must be greater than 0. Learn more about maxSurge. @@ -54950,22 +62063,31 @@ class InstanceGroupManagerUpdatePolicy(proto.Message): The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the - following conditions are satisfied: - The - instance's status is RUNNING. - If there is a - health check on the instance group, the - instance's health check status must be HEALTHY - at least once. If there is no health check on + following conditions are satisfied: + + + + - The instance's status is + RUNNING. + - If there is a health + check on the instance group, the instance's + health check status must be HEALTHY at + least once. If there is no health check on the group, then the instance only needs to have - a status of RUNNING to be considered available. + a status of RUNNING to be considered + available. + This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded if necessary. The - default value for maxUnavailable is a fixed - value equal to the number of zones in which the - managed instance group operates. At least one of - either maxSurge or maxUnavailable must be - greater than 0. Learn more about maxUnavailable. + default value formaxUnavailable is a fixed value + equal to the number of zones in which the + managed instance group operates. + + At least one of either maxSurge ormaxUnavailable + must be greater than 0. Learn more about + maxUnavailable. This field is a member of `oneof`_ ``_max_unavailable``. min_ready_sec (int): @@ -54978,18 +62100,22 @@ class InstanceGroupManagerUpdatePolicy(proto.Message): Minimal action to be taken on an instance. Use this option to minimize disruption as much as possible or to apply a more disruptive action - than is necessary. - To limit disruption as much - as possible, set the minimal action to REFRESH. - If your update requires a more disruptive - action, Compute Engine performs the necessary - action to execute the update. - To apply a more - disruptive action than is strictly necessary, - set the minimal action to RESTART or REPLACE. - For example, Compute Engine does not need to - restart a VM to change its metadata. But if your - application reads instance metadata only when a - VM is restarted, you can set the minimal action - to RESTART in order to pick up metadata changes. + than is necessary. + + - To limit disruption as much as possible, + set the minimal action toREFRESH. If your + update requires a more disruptive action, + Compute Engine performs the necessary action + to execute the update. + - To apply a more disruptive action than is + strictly necessary, set the minimal action + to RESTART or REPLACE. For + example, Compute Engine does not need to + restart a VM to change its metadata. But if + your application reads instance metadata only + when a VM is restarted, you can set the + minimal action to RESTART in order to pick up + metadata changes. Check the MinimalAction enum for the list of possible values. @@ -54997,7 +62123,7 @@ class InstanceGroupManagerUpdatePolicy(proto.Message): most_disruptive_allowed_action (str): Most disruptive action that is allowed to be taken on an instance. You can specify either - NONE to forbid any actions, REFRESH to avoid + NONE to forbid any actions,REFRESH to avoid restarting the VM and to limit disruption as much as possible. RESTART to allow actions that can be applied without instance replacing or @@ -55017,24 +62143,29 @@ class InstanceGroupManagerUpdatePolicy(proto.Message): This field is a member of `oneof`_ ``_replacement_method``. type_ (str): - The type of update process. You can specify - either PROACTIVE so that the MIG automatically - updates VMs to the latest configurations or - OPPORTUNISTIC so that you can select the VMs - that you want to update. Check the Type enum for - the list of possible values. + The type + of update process. You can specify either + PROACTIVE so that the MIG automatically updates + VMs to the latest configurations orOPPORTUNISTIC + so that you can select the VMs that you want to + update. + Check the Type enum for the list of possible + values. This field is a member of `oneof`_ ``_type``. """ class InstanceRedistributionType(proto.Enum): - r"""The instance redistribution policy for regional managed - instance groups. Valid values are: - PROACTIVE (default): The - group attempts to maintain an even distribution of VM instances - across zones in the region. - NONE: For non-autoscaled groups, - proactive redistribution is disabled. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + r"""The + instance redistribution policy for regional managed instance + groups. Valid values are: + + - PROACTIVE (default): The group attempts to maintain an + even distribution of VM instances across zones in the region. + - NONE: For non-autoscaled groups, proactive + redistribution is disabled. + Additional supported values which may be not listed in the enum + directly due to technical reasons: NONE PROACTIVE @@ -55049,17 +62180,21 @@ class InstanceRedistributionType(proto.Enum): class MinimalAction(proto.Enum): r"""Minimal action to be taken on an instance. Use this option to minimize disruption as much as possible or to apply a more - disruptive action than is necessary. - To limit disruption as - much as possible, set the minimal action to REFRESH. If your - update requires a more disruptive action, Compute Engine - performs the necessary action to execute the update. - To apply - a more disruptive action than is strictly necessary, set the - minimal action to RESTART or REPLACE. For example, Compute - Engine does not need to restart a VM to change its metadata. But - if your application reads instance metadata only when a VM is - restarted, you can set the minimal action to RESTART in order to - pick up metadata changes. Additional supported values which may - be not listed in the enum directly due to technical reasons: + disruptive action than is necessary. + + - To limit disruption as much as possible, set the minimal + action toREFRESH. If your update requires a more disruptive + action, Compute Engine performs the necessary action to + execute the update. + - To apply a more disruptive action than is strictly + necessary, set the minimal action to RESTART or REPLACE. + For + example, Compute Engine does not need to restart a VM to + change its metadata. But if your application reads instance + metadata only when a VM is restarted, you can set the minimal + action to RESTART in order to pick up metadata changes. + Additional supported values which may be not listed in the enum + directly due to technical reasons: NONE REFRESH @@ -55075,13 +62210,14 @@ class MinimalAction(proto.Enum): class MostDisruptiveAllowedAction(proto.Enum): r"""Most disruptive action that is allowed to be taken on an - instance. You can specify either NONE to forbid any actions, - REFRESH to avoid restarting the VM and to limit disruption as - much as possible. RESTART to allow actions that can be applied - without instance replacing or REPLACE to allow all possible - actions. If the Updater determines that the minimal update - action needed is more disruptive than most disruptive allowed - action you specify it will not perform the update at all. + instance. You can specify either NONE to forbid any + actions,REFRESH to avoid restarting the VM and to limit + disruption as much as possible. RESTART to allow actions that + can be applied without instance replacing or REPLACE to allow + all possible actions. If the Updater determines that the minimal + update action needed is more disruptive than most disruptive + allowed action you specify it will not perform the update at + all. Additional supported values which may be not listed in the enum directly due to technical reasons: @@ -55117,11 +62253,13 @@ class ReplacementMethod(proto.Enum): SUBSTITUTE = 280924314 class Type(proto.Enum): - r"""The type of update process. You can specify either PROACTIVE - so that the MIG automatically updates VMs to the latest - configurations or OPPORTUNISTIC so that you can select the VMs - that you want to update. Additional supported values which may - be not listed in the enum directly due to technical reasons: + r"""The type + of update process. You can specify either PROACTIVE so that the + MIG automatically updates VMs to the latest configurations + orOPPORTUNISTIC so that you can select the VMs that you want to + update. + Additional supported values which may be not listed in the enum + directly due to technical reasons: PROACTIVE @@ -55130,9 +62268,9 @@ class Type(proto.Enum): A value indicating that the enum field is not set. OPPORTUNISTIC (429530089): - MIG will apply new configurations to existing - VMs only when you selectively target specific or - all VMs to be updated. + MIG will apply new configurations + to existing VMs only when you selectively target + specific or all VMs to be updated. """ UNDEFINED_TYPE = 0 OPPORTUNISTIC = 429530089 @@ -55193,8 +62331,8 @@ class InstanceGroupManagerVersion(proto.Message): create new instances in the managed instance group until the ``targetSize`` for this version is reached. The templates for existing instances in the group do not change unless you - run recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE; in those cases, + run recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the ``targetSize`` for this version is reached. @@ -55207,15 +62345,22 @@ class InstanceGroupManagerVersion(proto.Message): This field is a member of `oneof`_ ``_name``. target_size (google.cloud.compute_v1beta.types.FixedOrPercent): Specifies the intended number of instances to be created - from the instanceTemplate. The final number of instances - created from the template will be equal to: - If expressed - as a fixed number, the minimum of either targetSize.fixed or - instanceGroupManager.targetSize is used. - if expressed as a - percent, the targetSize would be (targetSize.percent/100 \* - InstanceGroupManager.targetSize) If there is a remainder, - the number is rounded. If unset, this version will update - any remaining instances not updated by another version. Read - Starting a canary update for more information. + from theinstanceTemplate. The final number of instances + created from the template will be equal to: + + :: + + - If expressed as a fixed number, the minimum of either + targetSize.fixed or + instanceGroupManager.targetSize is used. + - if expressed as a percent, the targetSize + would be (targetSize.percent/100 * + InstanceGroupManager.targetSize) If there is a remainder, the + number is rounded. + + If unset, this version will update any remaining instances + not updated by another version. ReadStarting a canary update + for more information. This field is a member of `oneof`_ ``_target_size``. """ @@ -55270,45 +62415,67 @@ class InstanceGroupManagersApplyUpdatesRequest(proto.Message): instances (MutableSequence[str]): The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial - URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + URL, such aszones/[ZONE]/instances/[INSTANCE_NAME]. minimal_action (str): The minimal action that you want to perform - on each instance during the update: - REPLACE: - At minimum, delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - minimum action is NONE. If your update requires - a more disruptive action than you set with this - flag, the necessary action is performed to - execute the update. Check the MinimalAction enum - for the list of possible values. + on each instance during the update: + + + - REPLACE: At minimum, delete the instance + and create it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + + By default, the minimum action is NONE. If your + update requires a more disruptive action than + you set with this flag, the necessary action is + performed to execute the update. Check the + MinimalAction enum for the list of possible + values. This field is a member of `oneof`_ ``_minimal_action``. most_disruptive_allowed_action (str): The most disruptive action that you want to - perform on each instance during the update: - - REPLACE: Delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - most disruptive allowed action is REPLACE. If - your update requires a more disruptive action - than you set with this flag, the update request - will fail. Check the MostDisruptiveAllowedAction - enum for the list of possible values. + perform on each instance during the update: + + + - REPLACE: Delete the instance and create + it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and + limit disruption as much as possible. + - NONE: Do not disrupt the + instance at all. + + By default, the most disruptive allowed action + is REPLACE. If your update requires a more + disruptive action than you set with this flag, + the update request will fail. + Check the MostDisruptiveAllowedAction enum for + the list of possible values. This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. """ class MinimalAction(proto.Enum): r"""The minimal action that you want to perform on each instance - during the update: - REPLACE: At minimum, delete the instance - and create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. + during the update: + + + - REPLACE: At minimum, delete the instance and create it + again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update. Additional @@ -55329,15 +62496,21 @@ class MinimalAction(proto.Enum): class MostDisruptiveAllowedAction(proto.Enum): r"""The most disruptive action that you want to perform on each - instance during the update: - REPLACE: Delete the instance and - create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. + instance during the update: + + + - REPLACE: Delete the instance and create it again. + - RESTART: Stop the instance and start it again. + - REFRESH: Do not stop the instance and limit disruption + as much as possible. + - NONE: Do not disrupt the + instance at all. + By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with - this flag, the update request will fail. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + this flag, the update request will fail. + Additional supported values which may be not listed in the enum + directly due to technical reasons: NONE REFRESH @@ -55440,6 +62613,87 @@ class InstanceGroupManagersDeletePerInstanceConfigsReq(proto.Message): ) +class InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse(proto.Message): + r""" + + Attributes: + accelerator_topologies_info (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo]): + The accelerator topology information returned + per id of the topology location. + """ + + accelerator_topologies_info: MutableMapping[ + str, + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=84833420, + message="InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", + ) + + +class InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo( + proto.Message +): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_topology (str): + Topology in the format of: "16x16", "4x4x4", + etc. + + This field is a member of `oneof`_ ``_accelerator_topology``. + accelerator_topology_health (str): + Check the AcceleratorTopologyHealth enum for + the list of possible values. + + This field is a member of `oneof`_ ``_accelerator_topology_health``. + """ + + class AcceleratorTopologyHealth(proto.Enum): + r""" + + Values: + UNDEFINED_ACCELERATOR_TOPOLOGY_HEALTH (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + All VM are in RUNNING state, but there is an + issue with the inter-chip connectivity that + makes this part of the infrastructure ready to + use as a working inter-chip connected group only + in a degraded mode. This is allowed only for + Instances configured with ICI resiliency + HEALTHY (439801213): + All VM are in RUNNING state, there are no + issues with the inter-chip connectivity. + UNHEALTHY (462118084): + Some VMs may not be in RUNNING state, or + there is an issue with the inter-chip + connectivity that makes this part of the + infrastructure unsuitable for forming a working + inter-chip connected group. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_HEALTH = 0 + DEGRADED = 396890926 + HEALTHY = 439801213 + UNHEALTHY = 462118084 + + accelerator_topology: str = proto.Field( + proto.STRING, + number=389323203, + optional=True, + ) + accelerator_topology_health: str = proto.Field( + proto.STRING, + number=323449944, + optional=True, + ) + + class InstanceGroupManagersListErrorsResponse(proto.Message): r""" @@ -55452,7 +62706,7 @@ class InstanceGroupManagersListErrorsResponse(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -55488,7 +62742,7 @@ class InstanceGroupManagersListManagedInstancesResponse(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -55523,7 +62777,7 @@ class InstanceGroupManagersListPerInstanceConfigsResp(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -55604,20 +62858,25 @@ class InstanceGroupManagersResizeAdvancedRequest(proto.Message): we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously - until it succeeds. This flag matters only in the - first attempt of creation of an instance. After - an instance is successfully created while this - flag is enabled, the instance behaves the same - way as all the other instances created with a - regular resize request. In particular, if a - running instance dies unexpectedly at a later - time and needs to be recreated, this mode does - not affect the recreation behavior in that - scenario. This flag is applicable only to the - current resize request. It does not influence - other resize requests in any way. You can see - which instances is being creating in which mode - by calling the get or listManagedInstances API. + until it succeeds. + + This flag matters only in the first attempt of + creation of an instance. After an instance is + successfully created while this flag is enabled, + the instance behaves the same way as all the + other instances created with a regular resize + request. In particular, if a running instance + dies unexpectedly at a later time and needs to + be recreated, this mode does not affect the + recreation behavior in that scenario. + + This flag is applicable only to the current + resize request. It does not influence other + resize requests in any way. + + You can see which instances is being creating in + which mode by calling the get or + listManagedInstances API. This field is a member of `oneof`_ ``_no_creation_retries``. target_size (int): @@ -55718,9 +62977,9 @@ class InstanceGroupManagersSetInstanceTemplateRequest(proto.Message): group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do - not change unless you run recreateInstances, run - applyUpdatesToInstances, or set the group's - updatePolicy.type to PROACTIVE. + not change unless you run recreateInstances, + runapplyUpdatesToInstances, or set the + group'supdatePolicy.type to PROACTIVE. This field is a member of `oneof`_ ``_instance_template``. """ @@ -55743,7 +63002,7 @@ class InstanceGroupManagersSetTargetPoolsRequest(proto.Message): information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the - fingerprint with the instanceGroupManagers.get + fingerprint with theinstanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another @@ -55890,15 +63149,15 @@ class InstanceGroupsListInstances(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InstanceWithNamedPorts]): A list of InstanceWithNamedPorts resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupsListInstances for the list of + [Output Only] The resource type, which is + alwayscompute#instanceGroupsListInstances for the list of instances in the specified instance group. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -56019,7 +63278,7 @@ class InstanceGroupsScopedList(proto.Message): Attributes: instance_groups (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): - [Output Only] The list of instance groups that are contained + [Output Only] The list ofinstance groups that are contained in this scope. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] An informational warning that replaces the @@ -56052,12 +63311,12 @@ class InstanceGroupsSetNamedPortsRequest(proto.Message): information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings - concurrently. Obtain the fingerprint with the - instanceGroups.get method. Then, include the + concurrently. Obtain the fingerprint with + theinstanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an - incorrect fingerprint will fail with error 412 + incorrect fingerprint will fail with error412 conditionNotMet. This field is a member of `oneof`_ ``_fingerprint``. @@ -56099,7 +63358,7 @@ class InstanceList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -56166,15 +63425,15 @@ class InstanceListReferrers(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Reference]): A list of Reference resources. kind (str): - [Output Only] Type of resource. Always - compute#instanceListReferrers for lists of Instance + [Output Only] Type of resource. + Alwayscompute#instanceListReferrers for lists of Instance referrers. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -56357,14 +63616,16 @@ class Action(proto.Enum): The managed instance group is verifying this already created instance. Verification happens every time the instance is (re)created or - restarted and consists of: 1. Waiting until - health check specified as part of this managed - instance group's autohealing policy reports - HEALTHY. Note: Applies only if autohealing - policy has a health check specified 2. Waiting - for addition verification steps performed as - post-instance creation (subject to future - extensions). + restarted and consists of: + + 1. Waiting until health check specified as part + of this managed instance group's + autohealing policy reports HEALTHY. + Note: Applies only if autohealing policy has + a health check specified + 2. Waiting for addition verification steps + performed as post-instance creation + (subject to future extensions). """ UNDEFINED_ACTION = 0 ABANDONING = 388244813 @@ -56437,19 +63698,24 @@ class InstanceMoveRequest(proto.Message): The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a - zone: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - - projects/project/zones/zone - zones/zone + zone: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone + - projects/project/zones/zone + - zones/zone This field is a member of `oneof`_ ``_destination_zone``. target_instance (str): The URL of the target instance to move. This can be a full or partial URL. For example, the - following are all valid URLs to an instance: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance - - zones/zone/instances/instance + following are all valid URLs to an instance: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance + - zones/zone/instances/instance This field is a member of `oneof`_ ``_target_instance``. """ @@ -56518,7 +63784,7 @@ class InstanceProperties(proto.Message): their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave - this set to false. See the Enable IP forwarding + this set tofalse. See theEnable IP forwarding documentation for more information. This field is a member of `oneof`_ ``_can_ip_forward``. @@ -56540,9 +63806,10 @@ class InstanceProperties(proto.Message): properties. display_device (google.cloud.compute_v1beta.types.DisplayDevice): Display Device properties to enable support - for remote display products like: Teradici, VNC - and TeamViewer Note that for MachineImage, this - is not supported yet. + for remote display products like: Teradici, + VNC and TeamViewer + Note that for MachineImage, this is not + supported yet. This field is a member of `oneof`_ ``_display_device``. guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): @@ -56573,7 +63840,7 @@ class InstanceProperties(proto.Message): The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom - metadata or predefined keys. See Project and + metadata or predefined keys. SeeProject and instance metadata for more information. This field is a member of `oneof`_ ``_metadata``. @@ -56581,11 +63848,11 @@ class InstanceProperties(proto.Message): Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the - friendly names of CPU platforms, such as - minCpuPlatform: "Intel Haswell" or - minCpuPlatform: "Intel Sandy Bridge". For more - information, read Specifying a Minimum CPU - Platform. + friendly names of CPU platforms, such + asminCpuPlatform: "Intel Haswell" + orminCpuPlatform: "Intel Sandy Bridge". For more + information, read Specifying a + Minimum CPU Platform. This field is a member of `oneof`_ ``_min_cpu_platform``. network_interfaces (MutableSequence[google.cloud.compute_v1beta.types.NetworkInterface]): @@ -56628,9 +63895,9 @@ class InstanceProperties(proto.Message): ignored (both PUT & PATCH) when empty. resource_policies (MutableSequence[str]): Resource policies (names, not URLs) applied - to instances created from these properties. Note - that for MachineImage, this is not supported - yet. + to instances created from these properties. + Note that for MachineImage, this is not + supported yet. scheduling (google.cloud.compute_v1beta.types.Scheduling): Specifies the scheduling options for the instances that are created from these @@ -56907,7 +64174,8 @@ class InstanceReference(proto.Message): Attributes: instance (str): - The URL for a specific instance. @required + The URL for a specific instance. + @required compute.instancegroups.addInstances/removeInstances This field is a member of `oneof`_ ``_instance``. @@ -56941,13 +64209,15 @@ class InstanceSettings(proto.Message): provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve the resource. + conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve the resource. This field is a member of `oneof`_ ``_fingerprint``. kind (str): - [Output Only] Type of the resource. Always - compute#instance_settings for instance settings. + [Output Only] Type of the resource. + Alwayscompute#instance_settings for instance settings. This field is a member of `oneof`_ ``_kind``. metadata (google.cloud.compute_v1beta.types.InstanceSettingsMetadata): @@ -56993,9 +64263,9 @@ class InstanceSettingsMetadata(proto.Message): Attributes: items (MutableMapping[str, str]): - A metadata key/value items map. The total - size of all keys and values must be less than - 512KB. + A metadata key/value items map. + The total size of all keys and values must be + less than 512KB. kind (str): [Output Only] Type of the resource. Always compute#metadata for metadata. @@ -57016,17 +64286,22 @@ class InstanceSettingsMetadata(proto.Message): class InstanceTemplate(proto.Message): - r"""Represents an Instance Template resource. Google Compute Engine has - two Instance Template resources: \* - `Global `__ \* - `Regional `__ + r"""Represents an Instance Template resource. + + Google Compute Engine has two Instance Template resources: + + - `Global `__ + - `Regional `__ + You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or - achieve data residency, use a regional instance template. To create - VMs, managed instance groups, and reservations, you can use either - global or regional instance templates. For more information, read - Instance Templates. + achieve data residency, use a regional instance template. + + To create VMs, managed instance groups, and reservations, you can + use either global or regional instance templates. + + For more information, readInstance Templates. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -57034,7 +64309,7 @@ class InstanceTemplate(proto.Message): Attributes: creation_timestamp (str): [Output Only] The creation timestamp for this instance - template in RFC3339 text format. + template inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -57049,14 +64324,14 @@ class InstanceTemplate(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The resource type, which is always - compute#instanceTemplate for instance templates. + [Output Only] The resource type, which is + alwayscompute#instanceTemplate for instance templates. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -57083,10 +64358,13 @@ class InstanceTemplate(proto.Message): The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance This field is a member of `oneof`_ ``_source_instance``. source_instance_params (google.cloud.compute_v1beta.types.SourceInstanceParams): @@ -57171,7 +64449,7 @@ class InstanceTemplateAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -57239,15 +64517,15 @@ class InstanceTemplateList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InstanceTemplate]): A list of InstanceTemplate resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceTemplatesListResponse for instance template - lists. + [Output Only] The resource type, which is + alwayscompute#instanceTemplatesListResponse for instance + template lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -57751,19 +65029,24 @@ class InstancesResumeRequest(proto.Message): Attributes: disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): Array of disks associated with this instance - that are protected with a customer-supplied - encryption key. In order to resume the instance, - the disk url and its corresponding key must be - provided. If the disk is not protected with a + that are protected with acustomer-supplied + encryption key. + + In order to resume the instance, the disk url + and its corresponding key must be provided. + + If the disk is not protected with a customer-supplied encryption key it should not be specified. instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): Decrypts data associated with an instance - that is protected with a customer-supplied - encryption key. If the instance you are starting - is protected with a customer-supplied encryption - key, the correct key must be provided otherwise - the instance resume will not succeed. + that is protected with acustomer-supplied + encryption key. + + If the instance you are starting is protected + with a customer-supplied encryption key, the + correct key must be provided otherwise the + instance resume will not succeed. This field is a member of `oneof`_ ``_instance_encryption_key``. """ @@ -57863,8 +65146,8 @@ class InstancesSetMachineTypeRequest(proto.Message): machine_type (str): Full or partial URL of the machine type resource. See Machine Types for a full list of - machine types. For example: - zones/us-central1-f/machineTypes/n1-standard-1 + machine types. For + example:zones/us-central1-f/machineTypes/n1-standard-1 This field is a member of `oneof`_ ``_machine_type``. """ @@ -57991,10 +65274,13 @@ class InstancesStartWithEncryptionKeyRequest(proto.Message): Attributes: disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): Array of disks associated with this instance - that are protected with a customer-supplied - encryption key. In order to start the instance, - the disk url and its corresponding key must be - provided. If the disk is not protected with a + that are protected with acustomer-supplied + encryption key. + + In order to start the instance, the disk url and + its corresponding key must be provided. + + If the disk is not protected with a customer-supplied encryption key it should not be specified. """ @@ -58007,8 +65293,10 @@ class InstancesStartWithEncryptionKeyRequest(proto.Message): class InstantSnapshot(proto.Message): - r"""Represents a InstantSnapshot resource. You can use instant - snapshots to create disk rollback points quickly.. + r"""Represents a InstantSnapshot resource. + + You can use instant snapshots to create disk rollback points + quickly.. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -58021,7 +65309,7 @@ class InstantSnapshot(proto.Message): This field is a member of `oneof`_ ``_architecture``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -58040,8 +65328,8 @@ class InstantSnapshot(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#instantSnapshot for InstantSnapshot resources. + [Output Only] Type of the resource. + Alwayscompute#instantSnapshot for InstantSnapshot resources. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -58053,10 +65341,10 @@ class InstantSnapshot(proto.Message): request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - InstantSnapshot. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a InstantSnapshot. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): @@ -58066,7 +65354,7 @@ class InstantSnapshot(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -58109,15 +65397,26 @@ class InstantSnapshot(proto.Message): be in the same zone/region as the instant snapshot to be created. This can be a full or valid partial URL. For example, the following - are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk + + - + projects/project/zones/zone/disks/disk + + - + projects/project/regions/region/disks/disk + + - + zones/zone/disks/disk + + - + regions/region/disks/disk This field is a member of `oneof`_ ``_source_disk``. source_disk_id (str): @@ -58128,8 +65427,8 @@ class InstantSnapshot(proto.Message): This field is a member of `oneof`_ ``_source_disk_id``. status (str): - [Output Only] The status of the instantSnapshot. This can be - CREATING, DELETING, FAILED, or READY. Check the Status enum + [Output Only] The status of the instantSnapshot. This can + beCREATING, DELETING, FAILED, orREADY. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -58164,8 +65463,8 @@ class Architecture(proto.Enum): X86_64 = 425300551 class Status(proto.Enum): - r"""[Output Only] The status of the instantSnapshot. This can be - CREATING, DELETING, FAILED, or READY. + r"""[Output Only] The status of the instantSnapshot. This can + beCREATING, DELETING, FAILED, orREADY. Values: UNDEFINED_STATUS (0): @@ -58304,15 +65603,15 @@ class InstantSnapshotAggregatedList(proto.Message): A list of InstantSnapshotsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#instantSnapshotAggregatedList for aggregated lists - of instantSnapshots. + [Output Only] Type of resource. + Alwayscompute#instantSnapshotAggregatedList for aggregated + lists of instantSnapshots. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -58392,7 +65691,7 @@ class InstantSnapshotList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -58526,10 +65825,11 @@ class Int64RangeMatch(proto.Message): class Interconnect(proto.Message): - r"""Represents an Interconnect resource. An Interconnect resource - is a dedicated connection between the Google Cloud network and - your on-premises network. For more information, read the - Dedicated Interconnect Overview. + r"""Represents an Interconnect resource. + + An Interconnect resource is a dedicated connection between the + Google Cloud network and your on-premises network. For more + information, read the Dedicated Interconnect Overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -58557,17 +65857,27 @@ class Interconnect(proto.Message): available_features (MutableSequence[str]): [Output only] List of features available for this Interconnect connection, which can take one of the following - values: - IF_MACSEC If present then the Interconnect - connection is provisioned on MACsec capable hardware ports. - If not present then the Interconnect connection is - provisioned on non-MACsec capable ports and MACsec isn't - supported and enabling MACsec fails. Check the - AvailableFeatures enum for the list of possible values. + values: + + :: + + - IF_MACSEC: If present, then the Interconnect connection is + provisioned on MACsec capable hardware ports. If not present, then the + Interconnect connection is provisioned on non-MACsec capable ports. Any + attempt to enable MACsec will fail. + - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is + provisioned exclusively for Cross-Site Networking. Any attempt to configure + VLAN attachments will fail. If not present, then the Interconnect + connection is not provisioned for Cross-Site Networking. Any attempt to use + it for Cross-Site Networking will fail. + + Check the AvailableFeatures enum for the list of possible + values. circuit_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectCircuitInfo]): [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this LAG. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. customer_name (str): @@ -58609,17 +65919,23 @@ class Interconnect(proto.Message): Interconnect. Order is arbitrary and items are unique. interconnect_type (str): Type of interconnect, which can take one of the following - values: - PARTNER: A partner-managed interconnection shared - between customers though a partner. - DEDICATED: A dedicated - physical interconnection with the customer. Note that a - value IT_PRIVATE has been deprecated in favor of DEDICATED. - Check the InterconnectType enum for the list of possible - values. + values: + + :: + + - PARTNER: A partner-managed interconnection shared between customers + though a partner. + - DEDICATED: A dedicated physical interconnection with the + customer. + + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Check the InterconnectType enum for the list of + possible values. This field is a member of `oneof`_ ``_interconnect_type``. kind (str): - [Output Only] Type of the resource. Always - compute#interconnect for interconnects. + [Output Only] Type of the resource. + Alwayscompute#interconnect for interconnects. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -58631,26 +65947,30 @@ class Interconnect(proto.Message): to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - Interconnect. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an Interconnect. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. link_type (str): Type of link requested, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR - optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR - optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with - LR4 optics. Note that this field indicates the speed of each - of the links in the bundle, not the speed of the entire - bundle. Check the LinkType enum for the list of possible - values. + values: + + :: + + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. + + Note that this field indicates the speed of each of the + links in the bundle, not the speed of the entire bundle. + Check the LinkType enum for the list of possible values. This field is a member of `oneof`_ ``_link_type``. location (str): @@ -58675,7 +65995,7 @@ class Interconnect(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -58697,17 +66017,27 @@ class Interconnect(proto.Message): This field is a member of `oneof`_ ``_noc_contact_email``. operational_status (str): [Output Only] The current status of this Interconnect's - functionality, which can take one of the following values: - - OS_ACTIVE: A valid Interconnect, which is turned up and is - ready to use. Attachments may be provisioned on this - Interconnect. - OS_UNPROVISIONED: An Interconnect that has - not completed turnup. No attachments may be provisioned on - this Interconnect. - OS_UNDER_MAINTENANCE: An Interconnect - that is undergoing internal maintenance. No attachments may - be provisioned or updated on this Interconnect. Check the - OperationalStatus enum for the list of possible values. + functionality, which can take one of the following values: + + :: + + - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to + use. Attachments may be provisioned on this Interconnect. + + - OS_UNPROVISIONED: An Interconnect that has not completed + turnup. No attachments may be provisioned on this + Interconnect. + - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing + internal maintenance. No attachments may be provisioned or + updated on this Interconnect. Check the OperationalStatus + enum for the list of possible values. This field is a member of `oneof`_ ``_operational_status``. + params (google.cloud.compute_v1beta.types.InterconnectParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. + + This field is a member of `oneof`_ ``_params``. peer_ip_address (str): [Output Only] IP address configured on the customer side of the Interconnect link. The customer should configure this IP @@ -58728,13 +66058,20 @@ class Interconnect(proto.Message): This field is a member of `oneof`_ ``_remote_location``. requested_features (MutableSequence[str]): - Optional. List of features requested for this Interconnect - connection, which can take one of the following values: - - IF_MACSEC If specified then the connection is created on - MACsec capable hardware ports. If not specified, the default - value is false, which allocates non-MACsec capable ports - first if available. This parameter can be provided only with + Optional. This parameter can be provided only with Interconnect INSERT. It isn't valid for Interconnect PATCH. + List of features requested for this Interconnect connection, + which can take one of the following values: + + :: + + - IF_MACSEC: If specified, then the connection is created on MACsec + capable hardware ports. If not specified, non-MACsec capable ports will + also be considered. + - IF_CROSS_SITE_NETWORK: If specified, then the connection is created + exclusively for Cross-Site Networking. The connection can not be used for + Cross-Site Networking unless this feature is specified. + Check the RequestedFeatures enum for the list of possible values. requested_link_count (int): @@ -58752,15 +66089,19 @@ class Interconnect(proto.Message): This field is a member of `oneof`_ ``_self_link``. state (str): [Output Only] The current state of Interconnect - functionality, which can take one of the following values: - - ACTIVE: The Interconnect is valid, turned up and ready to - use. Attachments may be provisioned on this Interconnect. - - UNPROVISIONED: The Interconnect has not completed turnup. No - attachments may be provisioned on this Interconnect. - - UNDER_MAINTENANCE: The Interconnect is undergoing internal - maintenance. No attachments may be provisioned or updated on - this Interconnect. Check the State enum for the list of - possible values. + functionality, which can take one of the following values: + + :: + + - ACTIVE: The Interconnect is valid, turned up and ready to use. + Attachments may be provisioned on this Interconnect. + - UNPROVISIONED: The Interconnect has not completed turnup. No + attachments may be provisioned on this Interconnect. + - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. + No attachments may be provisioned or updated on this + Interconnect. + + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. subzone (str): @@ -58778,7 +66119,8 @@ class Interconnect(proto.Message): class AvailableFeatures(proto.Enum): r"""Additional supported values which may be not listed in the enum - directly due to technical reasons: IF_CROSS_SITE_NETWORK IF_MACSEC + directly due to technical reasons: IF_CROSS_SITE_NETWORK + IF_L2_FORWARDING IF_MACSEC Values: UNDEFINED_AVAILABLE_FEATURES (0): @@ -58788,11 +66130,17 @@ class AvailableFeatures(proto.Enum): UNDEFINED_AVAILABLE_FEATURES = 0 class InterconnectType(proto.Enum): - r"""Type of interconnect, which can take one of the following values: - - PARTNER: A partner-managed interconnection shared between customers - though a partner. - DEDICATED: A dedicated physical interconnection - with the customer. Note that a value IT_PRIVATE has been deprecated - in favor of DEDICATED. + r"""Type of interconnect, which can take one of the following values: + + :: + + - PARTNER: A partner-managed interconnection shared between customers + though a partner. + - DEDICATED: A dedicated physical interconnection with the + customer. + + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Values: UNDEFINED_INTERCONNECT_TYPE (0): @@ -58815,10 +66163,14 @@ class InterconnectType(proto.Enum): class LinkType(proto.Enum): r"""Type of link requested, which can take one of the following values: - - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note - that this field indicates the speed of each of the links in the + + :: + + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. + + Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle. Values: @@ -58839,14 +66191,18 @@ class LinkType(proto.Enum): class OperationalStatus(proto.Enum): r"""[Output Only] The current status of this Interconnect's - functionality, which can take one of the following values: - - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to - use. Attachments may be provisioned on this Interconnect. - - OS_UNPROVISIONED: An Interconnect that has not completed turnup. No - attachments may be provisioned on this Interconnect. - - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal - maintenance. No attachments may be provisioned or updated on this - Interconnect. + functionality, which can take one of the following values: + + :: + + - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to + use. Attachments may be provisioned on this Interconnect. + + - OS_UNPROVISIONED: An Interconnect that has not completed turnup. + No attachments may be provisioned on this Interconnect. + - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal + maintenance. No attachments may be provisioned or updated on this + Interconnect. Values: UNDEFINED_OPERATIONAL_STATUS (0): @@ -58867,7 +66223,8 @@ class OperationalStatus(proto.Enum): class RequestedFeatures(proto.Enum): r"""Additional supported values which may be not listed in the enum - directly due to technical reasons: IF_CROSS_SITE_NETWORK IF_MACSEC + directly due to technical reasons: IF_CROSS_SITE_NETWORK + IF_L2_FORWARDING IF_MACSEC Values: UNDEFINED_REQUESTED_FEATURES (0): @@ -58878,13 +66235,17 @@ class RequestedFeatures(proto.Enum): class State(proto.Enum): r"""[Output Only] The current state of Interconnect functionality, which - can take one of the following values: - ACTIVE: The Interconnect is - valid, turned up and ready to use. Attachments may be provisioned on - this Interconnect. - UNPROVISIONED: The Interconnect has not - completed turnup. No attachments may be provisioned on this - Interconnect. - UNDER_MAINTENANCE: The Interconnect is undergoing - internal maintenance. No attachments may be provisioned or updated - on this Interconnect. + can take one of the following values: + + :: + + - ACTIVE: The Interconnect is valid, turned up and ready to use. + Attachments may be provisioned on this Interconnect. + - UNPROVISIONED: The Interconnect has not completed turnup. No + attachments may be provisioned on this Interconnect. + - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. + No attachments may be provisioned or updated on this + Interconnect. Values: UNDEFINED_STATE (0): @@ -59048,6 +66409,12 @@ class Subzone(proto.Enum): number=201070847, optional=True, ) + params: "InterconnectParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="InterconnectParams", + ) peer_ip_address: str = proto.Field( proto.STRING, number=207735769, @@ -59242,11 +66609,12 @@ class InterconnectApplicationAwareInterconnectStrictPriorityPolicy(proto.Message class InterconnectAttachment(proto.Message): - r"""Represents an Interconnect Attachment (VLAN) resource. You - can use Interconnect attachments (VLANS) to connect your Virtual - Private Cloud networks to your on-premises networks through an - Interconnect. For more information, read Creating VLAN - Attachments. + r"""Represents an Interconnect Attachment (VLAN) resource. + + You can use Interconnect attachments (VLANS) to connect your + Virtual Private Cloud networks to your on-premises networks + through an Interconnect. For more information, read + Creating VLAN Attachments. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -59269,35 +66637,53 @@ class InterconnectAttachment(proto.Message): Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the - following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 - Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 - Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 - Gbit/s - BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s - BPS_100G: - 100 Gbit/s Check the Bandwidth enum for the list of possible - values. + following values: + + :: + + - BPS_50M: 50 Mbit/s + - BPS_100M: 100 Mbit/s + - BPS_200M: 200 Mbit/s + - BPS_300M: 300 Mbit/s + - BPS_400M: 400 Mbit/s + - BPS_500M: 500 Mbit/s + - BPS_1G: 1 Gbit/s + - BPS_2G: 2 Gbit/s + - BPS_5G: 5 Gbit/s + - BPS_10G: 10 Gbit/s + - BPS_20G: 20 Gbit/s + - BPS_50G: 50 Gbit/s + - BPS_100G: 100 Gbit/s + + Check the Bandwidth enum for the list of possible values. This field is a member of `oneof`_ ``_bandwidth``. candidate_cloud_router_ip_address (str): Single IPv4 address + prefix length to be configured on the - cloud router interface for this interconnect attachment. - - Both candidate_cloud_router_ip_address and - candidate_customer_router_ip_address fields must be set or - both must be unset. - Prefix length of both - candidate_cloud_router_ip_address and - candidate_customer_router_ip_address must be the same. - Max - prefix length is 31. + cloud router interface for this interconnect attachment. + + :: + + - Both candidate_cloud_router_ip_address and + candidate_customer_router_ip_address fields must be set or both must be + unset. + - Prefix length of both candidate_cloud_router_ip_address and + candidate_customer_router_ip_address must be the same. + - Max prefix length is 31. This field is a member of `oneof`_ ``_candidate_cloud_router_ip_address``. candidate_cloud_router_ipv6_address (str): Single IPv6 address + prefix length to be configured on the - cloud router interface for this interconnect attachment. - - Both candidate_cloud_router_ipv6_address and - candidate_customer_router_ipv6_address fields must be set or - both must be unset. - Prefix length of both - candidate_cloud_router_ipv6_address and - candidate_customer_router_ipv6_address must be the same. - - Max prefix length is 126. + cloud router interface for this interconnect attachment. + + :: + + - Both candidate_cloud_router_ipv6_address and + candidate_customer_router_ipv6_address fields must be set or both must be + unset. + - Prefix length of both candidate_cloud_router_ipv6_address and + candidate_customer_router_ipv6_address must be the same. + - Max prefix length is 126. This field is a member of `oneof`_ ``_candidate_cloud_router_ipv6_address``. candidate_customer_router_ip_address (str): @@ -59347,7 +66733,7 @@ class InterconnectAttachment(proto.Message): This field is a member of `oneof`_ ``_configuration_constraints``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. customer_router_ip_address (str): @@ -59380,10 +66766,16 @@ class InterconnectAttachment(proto.Message): edge_availability_domain (str): Input only. Desired availability domain for the attachment. Only available for type PARTNER, at creation time, and can - take one of the following values: - AVAILABILITY_DOMAIN_ANY - - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved - reliability, customers should configure a pair of - attachments, one per availability domain. The selected + take one of the following values: + + :: + + - AVAILABILITY_DOMAIN_ANY + - AVAILABILITY_DOMAIN_1 + - AVAILABILITY_DOMAIN_2 + + For improved reliability, customers should configure a pair + of attachments, one per availability domain. The selected availability domain will be provided to the Partner via the pairing key, so that the provisioned circuit will lie in the specified domain. If not specified, the value will default @@ -59395,17 +66787,21 @@ class InterconnectAttachment(proto.Message): Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. - Possible values are: - NONE - This is the default value, - which means that the VLAN attachment carries unencrypted - traffic. VMs are able to send traffic to, or receive traffic - from, such a VLAN attachment. - IPSEC - The VLAN attachment - carries only encrypted traffic that is encrypted by an IPsec - device, such as an HA VPN gateway or third-party IPsec VPN. - VMs cannot directly send traffic to, or receive traffic - from, such a VLAN attachment. To use *HA VPN over Cloud - Interconnect*, the VLAN attachment must be created with this - option. Check the Encryption enum for the list of possible - values. + Possible values are: + + :: + + - NONE - This is the default value, which means that the + VLAN attachment carries unencrypted traffic. VMs are able to send + traffic to, or receive traffic from, such a VLAN attachment. + - IPSEC - The VLAN attachment carries only encrypted + traffic that is encrypted by an IPsec device, such as an HA VPN gateway or + third-party IPsec VPN. VMs cannot directly send traffic to, or receive + traffic from, such a VLAN attachment. To use *HA VPN over Cloud + Interconnect*, the VLAN attachment must be created with this + option. + + Check the Encryption enum for the list of possible values. This field is a member of `oneof`_ ``_encryption``. google_reference_id (str): @@ -59440,17 +66836,29 @@ class InterconnectAttachment(proto.Message): attachment, then a regional internal IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this - VLAN attachment. If this field is not specified - when creating the VLAN attachment, then later on - when creating an HA VPN gateway on this VLAN - attachment, the HA VPN gateway's IP address is - allocated from the regional external IP address - pool. + VLAN attachment. + If this field is not specified when creating the + VLAN attachment, then later on when creating an + HA VPN gateway on this VLAN attachment, the HA + VPN gateway's IP address is allocated from the + regional external IP address pool. kind (str): - [Output Only] Type of the resource. Always - compute#interconnectAttachment for interconnect attachments. + [Output Only] Type of the resource. + Alwayscompute#interconnectAttachment for interconnect + attachments. This field is a member of `oneof`_ ``_kind``. + l2_forwarding (google.cloud.compute_v1beta.types.InterconnectAttachmentL2Forwarding): + L2 Interconnect Attachment related config. This field is + required if the type is L2_DEDICATED. + + The configuration specifies how VLAN tags (like dot1q, qinq, + or dot1ad) within L2 packets are mapped to the destination + appliances IP addresses. The packet is then encapsulated + with the appliance IP address and sent to the edge + appliance. + + This field is a member of `oneof`_ ``_l2_forwarding``. label_fingerprint (str): A fingerprint for the labels being applied to this InterconnectAttachment, which is @@ -59460,16 +66868,17 @@ class InterconnectAttachment(proto.Message): every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, - otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - InterconnectAttachment. + otherwise the request will fail with error412 + conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an InterconnectAttachment. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. mtu (int): Maximum Transmission Unit (MTU), in bytes, of @@ -59482,7 +66891,7 @@ class InterconnectAttachment(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -59493,11 +66902,17 @@ class InterconnectAttachment(proto.Message): operational_status (str): [Output Only] The current status of whether or not this interconnect attachment is functional, which can take one of - the following values: - OS_ACTIVE: The attachment has been - turned up and is ready to use. - OS_UNPROVISIONED: The - attachment is not ready to use yet, because turnup is not - complete. Check the OperationalStatus enum for the list of - possible values. + the following values: + + :: + + - OS_ACTIVE: The attachment has been turned up and is ready to + use. + - OS_UNPROVISIONED: The attachment is not ready to use yet, + because turnup is not complete. + + Check the OperationalStatus enum for the list of possible + values. This field is a member of `oneof`_ ``_operational_status``. pairing_key (str): @@ -59508,6 +66923,11 @@ class InterconnectAttachment(proto.Message): "XXXXX/region/domain". This field is a member of `oneof`_ ``_pairing_key``. + params (google.cloud.compute_v1beta.types.InterconnectAttachmentParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. + + This field is a member of `oneof`_ ``_params``. partner_asn (int): Optional BGP ASN for the router supplied by a Layer 3 Partner if they configured BGP on behalf of the customer. @@ -59539,9 +66959,10 @@ class InterconnectAttachment(proto.Message): [Output Only] If the attachment is on a Cross-Cloud Interconnect connection, this field contains the interconnect's remote location service provider. Example - values: "Amazon Web Services" "Microsoft Azure". The field - is set only for attachments on Cross-Cloud Interconnect - connections. Its value is copied from the + values: "Amazon Web Services" "Microsoft Azure". + + The field is set only for attachments on Cross-Cloud + Interconnect connections. Its value is copied from the InterconnectRemoteLocation remoteService field. This field is a member of `oneof`_ ``_remote_service``. @@ -59565,10 +66986,11 @@ class InterconnectAttachment(proto.Message): stack_type (str): The stack type for this interconnect attachment to identify whether the IPv6 feature is enabled or not. If not - specified, IPV4_ONLY will be used. This field can be both - set at interconnect attachments creation and update - interconnect attachment operations. Check the StackType enum - for the list of possible values. + specified, IPV4_ONLY will be used. + + This field can be both set at interconnect attachments + creation and update interconnect attachment operations. + Check the StackType enum for the list of possible values. This field is a member of `oneof`_ ``_stack_type``. state (str): @@ -59578,47 +67000,64 @@ class InterconnectAttachment(proto.Message): interconnect attachments, while enum values PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only PARTNER and PARTNER_PROVIDER interconnect attachments. - This state can take one of the following values: - ACTIVE: - The attachment has been turned up and is ready to use. - - UNPROVISIONED: The attachment is not ready to use yet, - because turnup is not complete. - PENDING_PARTNER: A - newly-created PARTNER attachment that has not yet been - configured on the Partner side. - PARTNER_REQUEST_RECEIVED: - A PARTNER attachment is in the process of provisioning after - a PARTNER_PROVIDER attachment was created that references - it. - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER - attachment that is waiting for a customer to activate it. - - DEFUNCT: The attachment was deleted externally and is no - longer functional. This could be because the associated - Interconnect was removed, or because the other side of a - Partner attachment was deleted. Check the State enum for the - list of possible values. + This state can take one of the following values: + + :: + + - ACTIVE: The attachment has been turned up and is ready to use. + - UNPROVISIONED: The attachment is not ready to use yet, because turnup + is not complete. + - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet + been configured on the Partner side. + - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of + provisioning after a PARTNER_PROVIDER attachment was created that + references it. + - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER + attachment that is waiting for a customer to activate it. + - DEFUNCT: + The attachment was deleted externally and is no longer functional. This + could be because the associated Interconnect was removed, or because the + other side of a Partner attachment was deleted. + + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. subnet_length (int): Input only. Length of the IPv4 subnet mask. - Allowed values: - 29 (default) - 30 The default - value is 29, except for Cross-Cloud Interconnect - connections that use an + Allowed values: + + + - 29 (default) + - 30 + + The default value is 29, except for Cross-Cloud + Interconnect connections that use an InterconnectRemoteLocation with a constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure remote location fall into this category. In these cases, the default value is 30, and - requesting 29 returns an error. Where both 29 - and 30 are allowed, 29 is preferred, because it - gives Google Cloud Support more debugging - visibility. + requesting 29 returns an error. + + Where both 29 and 30 are allowed, 29 is + preferred, because it gives Google Cloud Support + more debugging visibility. This field is a member of `oneof`_ ``_subnet_length``. type_ (str): The type of interconnect attachment this is, which can take - one of the following values: - DEDICATED: an attachment to a - Dedicated Interconnect. - PARTNER: an attachment to a - Partner Interconnect, created by the customer. - - PARTNER_PROVIDER: an attachment to a Partner Interconnect, - created by the partner. Check the Type enum for the list of - possible values. + one of the following values: + + :: + + - DEDICATED: an attachment to a Dedicated Interconnect. + - PARTNER: an attachment to a Partner Interconnect, created by the + customer. + - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by + the partner. + + - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. vlan_tag8021q (int): @@ -59635,11 +67074,23 @@ class Bandwidth(proto.Enum): attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one - of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 Gbit/s - - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - - BPS_50G: 50 Gbit/s - BPS_100G: 100 Gbit/s + of the following values: + + :: + + - BPS_50M: 50 Mbit/s + - BPS_100M: 100 Mbit/s + - BPS_200M: 200 Mbit/s + - BPS_300M: 300 Mbit/s + - BPS_400M: 400 Mbit/s + - BPS_500M: 500 Mbit/s + - BPS_1G: 1 Gbit/s + - BPS_2G: 2 Gbit/s + - BPS_5G: 5 Gbit/s + - BPS_10G: 10 Gbit/s + - BPS_20G: 20 Gbit/s + - BPS_50G: 50 Gbit/s + - BPS_100G: 100 Gbit/s Values: UNDEFINED_BANDWIDTH (0): @@ -59690,13 +67141,19 @@ class Bandwidth(proto.Enum): class EdgeAvailabilityDomain(proto.Enum): r"""Input only. Desired availability domain for the attachment. Only available for type PARTNER, at creation time, and can take one of - the following values: - AVAILABILITY_DOMAIN_ANY - - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved - reliability, customers should configure a pair of attachments, one - per availability domain. The selected availability domain will be - provided to the Partner via the pairing key, so that the provisioned - circuit will lie in the specified domain. If not specified, the - value will default to AVAILABILITY_DOMAIN_ANY. + the following values: + + :: + + - AVAILABILITY_DOMAIN_ANY + - AVAILABILITY_DOMAIN_1 + - AVAILABILITY_DOMAIN_2 + + For improved reliability, customers should configure a pair of + attachments, one per availability domain. The selected availability + domain will be provided to the Partner via the pairing key, so that + the provisioned circuit will lie in the specified domain. If not + specified, the value will default to AVAILABILITY_DOMAIN_ANY. Values: UNDEFINED_EDGE_AVAILABILITY_DOMAIN (0): @@ -59718,15 +67175,19 @@ class Encryption(proto.Enum): r"""Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible - values are: - NONE - This is the default value, which means that the - VLAN attachment carries unencrypted traffic. VMs are able to send - traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - - The VLAN attachment carries only encrypted traffic that is - encrypted by an IPsec device, such as an HA VPN gateway or - third-party IPsec VPN. VMs cannot directly send traffic to, or - receive traffic from, such a VLAN attachment. To use *HA VPN over - Cloud Interconnect*, the VLAN attachment must be created with this - option. + values are: + + :: + + - NONE - This is the default value, which means that the + VLAN attachment carries unencrypted traffic. VMs are able to send + traffic to, or receive traffic from, such a VLAN attachment. + - IPSEC - The VLAN attachment carries only encrypted + traffic that is encrypted by an IPsec device, such as an HA VPN gateway or + third-party IPsec VPN. VMs cannot directly send traffic to, or receive + traffic from, such a VLAN attachment. To use *HA VPN over Cloud + Interconnect*, the VLAN attachment must be created with this + option. Values: UNDEFINED_ENCRYPTION (0): @@ -59737,7 +67198,7 @@ class Encryption(proto.Enum): encrypted traffic that is encrypted by an IPsec device such as HA VPN gateway; VMs cannot directly send traffic to or receive traffic from - such an interconnect attachment. To use HA VPN + such an interconnect attachment. To use HA VPN over Cloud Interconnect, the interconnect attachment must be created with this option. NONE (2402104): @@ -59754,9 +67215,14 @@ class Encryption(proto.Enum): class OperationalStatus(proto.Enum): r"""[Output Only] The current status of whether or not this interconnect attachment is functional, which can take one of the following - values: - OS_ACTIVE: The attachment has been turned up and is ready - to use. - OS_UNPROVISIONED: The attachment is not ready to use yet, - because turnup is not complete. + values: + + :: + + - OS_ACTIVE: The attachment has been turned up and is ready to + use. + - OS_UNPROVISIONED: The attachment is not ready to use yet, + because turnup is not complete. Values: UNDEFINED_OPERATIONAL_STATUS (0): @@ -59776,8 +67242,10 @@ class OperationalStatus(proto.Enum): class StackType(proto.Enum): r"""The stack type for this interconnect attachment to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will - be used. This field can be both set at interconnect attachments - creation and update interconnect attachment operations. + be used. + + This field can be both set at interconnect attachments creation and + update interconnect attachment operations. Values: UNDEFINED_STACK_TYPE (0): @@ -59801,18 +67269,24 @@ class State(proto.Enum): attachments, while enum values PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only PARTNER and PARTNER_PROVIDER interconnect attachments. This state - can take one of the following values: - ACTIVE: The attachment has - been turned up and is ready to use. - UNPROVISIONED: The attachment - is not ready to use yet, because turnup is not complete. - - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet - been configured on the Partner side. - PARTNER_REQUEST_RECEIVED: A - PARTNER attachment is in the process of provisioning after a - PARTNER_PROVIDER attachment was created that references it. - - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER attachment that is - waiting for a customer to activate it. - DEFUNCT: The attachment was - deleted externally and is no longer functional. This could be - because the associated Interconnect was removed, or because the - other side of a Partner attachment was deleted. + can take one of the following values: + + :: + + - ACTIVE: The attachment has been turned up and is ready to use. + - UNPROVISIONED: The attachment is not ready to use yet, because turnup + is not complete. + - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet + been configured on the Partner side. + - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of + provisioning after a PARTNER_PROVIDER attachment was created that + references it. + - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER + attachment that is waiting for a customer to activate it. + - DEFUNCT: + The attachment was deleted externally and is no longer functional. This + could be because the associated Interconnect was removed, or because the + other side of a Partner attachment was deleted. Values: UNDEFINED_STATE (0): @@ -59854,10 +67328,17 @@ class State(proto.Enum): class Type(proto.Enum): r"""The type of interconnect attachment this is, which can take one of - the following values: - DEDICATED: an attachment to a Dedicated - Interconnect. - PARTNER: an attachment to a Partner Interconnect, - created by the customer. - PARTNER_PROVIDER: an attachment to a - Partner Interconnect, created by the partner. + the following values: + + :: + + - DEDICATED: an attachment to a Dedicated Interconnect. + - PARTNER: an attachment to a Partner Interconnect, created by the + customer. + - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by + the partner. + + - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. Values: UNDEFINED_TYPE (0): @@ -59865,6 +67346,9 @@ class Type(proto.Enum): set. DEDICATED (258411983): Attachment to a dedicated interconnect. + L2_DEDICATED (336595510): + Attachment to a dedicated interconnect, + forwarding L2 packets. PARTNER (461924520): Attachment to a partner interconnect, created by the customer. @@ -59874,6 +67358,7 @@ class Type(proto.Enum): """ UNDEFINED_TYPE = 0 DEDICATED = 258411983 + L2_DEDICATED = 336595510 PARTNER = 461924520 PARTNER_PROVIDER = 483261352 @@ -60007,6 +67492,12 @@ class Type(proto.Enum): number=3292052, optional=True, ) + l2_forwarding: "InterconnectAttachmentL2Forwarding" = proto.Field( + proto.MESSAGE, + number=84784022, + optional=True, + message="InterconnectAttachmentL2Forwarding", + ) label_fingerprint: str = proto.Field( proto.STRING, number=178124825, @@ -60037,6 +67528,12 @@ class Type(proto.Enum): number=439695464, optional=True, ) + params: "InterconnectAttachmentParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="InterconnectAttachmentParams", + ) partner_asn: int = proto.Field( proto.INT64, number=438166149, @@ -60121,15 +67618,15 @@ class InterconnectAttachmentAggregatedList(proto.Message): A list of InterconnectAttachmentsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#interconnectAttachmentAggregatedList for aggregated - lists of interconnect attachments. + [Output Only] Type of resource. + Alwayscompute#interconnectAttachmentAggregatedList for + aggregated lists of interconnect attachments. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -60199,10 +67696,11 @@ class InterconnectAttachmentConfigurationConstraints(proto.Message): [Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, - MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud - Interconnect connection to a remote cloud provider that - requires BGP MD5 authentication has the - interconnectRemoteLocation + MD5_REQUIRED, MD5_UNSUPPORTED. + + For example, a Cross-Cloud Interconnect connection to a + remote cloud provider that requires BGP MD5 authentication + has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an @@ -60215,18 +67713,21 @@ class InterconnectAttachmentConfigurationConstraints(proto.Message): known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to - be 123 or anything in the range 64512-65534. This field is - only advisory. Although the API accepts other ranges, these - are the ranges that we recommend. + be 123 or anything in the range 64512-65534. + + This field is only advisory. Although the API accepts other + ranges, these are the ranges that we recommend. """ class BgpMd5(proto.Enum): r"""[Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, - MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection - to a remote cloud provider that requires BGP MD5 authentication has - the interconnectRemoteLocation + MD5_UNSUPPORTED. + + For example, a Cross-Cloud Interconnect connection to a remote cloud + provider that requires BGP MD5 authentication has the + interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if @@ -60311,7 +67812,7 @@ class InterconnectAttachmentGroup(proto.Message): This field is a member of `oneof`_ ``_configured``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -60327,7 +67828,7 @@ class InterconnectAttachmentGroup(proto.Message): provided token must match the current token or the update is rejected. This provides a reliable means of doing read-modify-write (optimistic - locking) as described by AIP 154. + locking) as described byAIP 154. This field is a member of `oneof`_ ``_etag``. id (int): @@ -60356,7 +67857,7 @@ class InterconnectAttachmentGroup(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -60882,7 +68383,7 @@ class InterconnectAttachmentGroupsListResponse(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -61163,6 +68664,197 @@ class Status(proto.Enum): ) +class InterconnectAttachmentL2Forwarding(proto.Message): + r"""L2 Interconnect Attachment related configuration. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + appliance_mappings (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingApplianceMapping]): + Optional. A map of VLAN tags to appliances + and optional inner mapping rules. If VLANs are + not explicitly mapped to any appliance, the + defaultApplianceIpAddress is used. + + Each VLAN tag can be a single number or a range + of numbers in the range of 1 to 4094, e.g., "1" + or "4001-4094". Non-empty and non-overlapping + VLAN tag ranges are enforced, and violating + operations will be rejected. + + The VLAN tags in the Ethernet header must use an + ethertype value of 0x88A8 or 0x8100. + default_appliance_ip_address (str): + Optional. A single IPv4 or IPv6 address used + as the default destination IP when there is no + VLAN mapping result found. + + Unset field (null-value) indicates the unmatched + packet should be dropped. + + This field is a member of `oneof`_ ``_default_appliance_ip_address``. + geneve_header (google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingGeneveHeader): + Optional. It represents the structure of a + Geneve (Generic Network Virtualization + Encapsulation) header, as defined in RFC8926. It + encapsulates packets from various protocols + (e.g., Ethernet, IPv4, IPv6) for use in network + virtualization environments. + + This field is a member of `oneof`_ ``_geneve_header``. + network (str): + Required. Resource URL of the network to + which this attachment belongs. + + This field is a member of `oneof`_ ``_network``. + tunnel_endpoint_ip_address (str): + Required. A single IPv4 or IPv6 address. This + address will be used as the source IP address + for packets sent to the appliances, and must be + used as the destination IP address for packets + that should be sent out through this attachment. + + This field is a member of `oneof`_ ``_tunnel_endpoint_ip_address``. + """ + + appliance_mappings: MutableMapping[ + str, "InterconnectAttachmentL2ForwardingApplianceMapping" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=374529975, + message="InterconnectAttachmentL2ForwardingApplianceMapping", + ) + default_appliance_ip_address: str = proto.Field( + proto.STRING, + number=536490476, + optional=True, + ) + geneve_header: "InterconnectAttachmentL2ForwardingGeneveHeader" = proto.Field( + proto.MESSAGE, + number=118688424, + optional=True, + message="InterconnectAttachmentL2ForwardingGeneveHeader", + ) + network: str = proto.Field( + proto.STRING, + number=232872494, + optional=True, + ) + tunnel_endpoint_ip_address: str = proto.Field( + proto.STRING, + number=468740975, + optional=True, + ) + + +class InterconnectAttachmentL2ForwardingApplianceMapping(proto.Message): + r"""Two-level VLAN-to-Appliance mapping rule. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + appliance_ip_address (str): + Optional. A single IPv4 or IPv6 address used + as the destination IP address for ingress + packets that match on a VLAN tag, but do not + match a more specific inner VLAN tag. + + Unset field (null-value) indicates both VLAN + tags are required to be mapped. Otherwise, + defaultApplianceIpAddress is used. + + This field is a member of `oneof`_ ``_appliance_ip_address``. + inner_vlan_to_appliance_mappings (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping]): + Optional. Used to match against the inner + VLAN when the packet contains two VLAN tags. + + A list of mapping rules from inner VLAN tags to + IP addresses. If the inner VLAN is not + explicitly mapped to an IP address range, the + applianceIpAddress is used. + name (str): + Optional. The name of this appliance mapping + rule. + + This field is a member of `oneof`_ ``_name``. + """ + + appliance_ip_address: str = proto.Field( + proto.STRING, + number=57985710, + optional=True, + ) + inner_vlan_to_appliance_mappings: MutableSequence[ + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping" + ] = proto.RepeatedField( + proto.MESSAGE, + number=97387944, + message="InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + + +class InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping( + proto.Message +): + r"""The inner VLAN-to-Appliance mapping. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + inner_appliance_ip_address (str): + Required in this object. A single IPv4 or + IPv6 address used as the destination IP address + for ingress packets that match on both VLAN + tags. + + This field is a member of `oneof`_ ``_inner_appliance_ip_address``. + inner_vlan_tags (MutableSequence[str]): + Required in this object. Used to match the inner VLAN tag on + the packet. Each entry can be a single number or a range of + numbers in the range of 1 to 4094, e.g., ["1", "4001-4094"] + is valid. Non-empty and Non-overlapping VLAN tag ranges are + enforced, and violating operations will be rejected. + + The inner VLAN tags must have an ethertype value of 0x8100. + """ + + inner_appliance_ip_address: str = proto.Field( + proto.STRING, + number=350619895, + optional=True, + ) + inner_vlan_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=431186636, + ) + + +class InterconnectAttachmentL2ForwardingGeneveHeader(proto.Message): + r"""GeneveHeader related configurations. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vni (int): + Optional. VNI is a 24-bit unique virtual + network identifier, from 0 to 16,777,215. + + This field is a member of `oneof`_ ``_vni``. + """ + + vni: int = proto.Field( + proto.UINT32, + number=116913, + optional=True, + ) + + class InterconnectAttachmentList(proto.Message): r"""Response to the list request, and contains a list of interconnect attachments. @@ -61179,15 +68871,15 @@ class InterconnectAttachmentList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachment]): A list of InterconnectAttachment resources. kind (str): - [Output Only] Type of resource. Always - compute#interconnectAttachmentList for lists of interconnect - attachments. + [Output Only] Type of resource. + Alwayscompute#interconnectAttachmentList for lists of + interconnect attachments. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -61240,6 +68932,37 @@ def raw_page(self): ) +class InterconnectAttachmentParams(proto.Message): + r"""Additional interconnect attachment parameters. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, + ) + + class InterconnectAttachmentPartnerMetadata(proto.Message): r"""Informational metadata about Partner attachments from Partners to display to customers. These fields are propagated from @@ -61401,8 +69124,9 @@ class InterconnectDiagnostics(proto.Message): A list of InterconnectDiagnostics.ARPEntry objects, describing individual neighbors currently seen by the Google router in the ARP - cache for the Interconnect. This will be empty - when the Interconnect is not bundled. + cache for the Interconnect. + This will be empty when the Interconnect is not + bundled. bundle_aggregation_type (str): The aggregation type of the bundle interface. Check the BundleAggregationType enum for the @@ -61542,21 +69266,26 @@ class InterconnectDiagnosticsLinkLACPStatus(proto.Message): This field is a member of `oneof`_ ``_neighbor_system_id``. state (str): The state of a LACP link, which can take one - of the following values: - ACTIVE: The link is - configured and active within the bundle. - - DETACHED: The link is not configured within the - bundle. This means that the rest of the object - should be empty. Check the State enum for the - list of possible values. + of the following values: + + - ACTIVE: The link is configured and active + within the bundle. + - DETACHED: The link is not configured within + the bundle. This means that the rest of the + object should be empty. Check the State enum + for the list of possible values. This field is a member of `oneof`_ ``_state``. """ class State(proto.Enum): r"""The state of a LACP link, which can take one of the following - values: - ACTIVE: The link is configured and active within the - bundle. - DETACHED: The link is not configured within the - bundle. This means that the rest of the object should be empty. + values: + + - ACTIVE: The link is configured and active within the + bundle. + - DETACHED: The link is not configured within the bundle. + This means that the rest of the object should be empty. Values: UNDEFINED_STATE (0): @@ -61600,14 +69329,21 @@ class InterconnectDiagnosticsLinkOpticalPower(proto.Message): state (str): The status of the current value when compared to the warning and alarm levels for the receiving or transmitting - transceiver. Possible states include: - OK: The value has - not crossed a warning threshold. - LOW_WARNING: The value - has crossed below the low warning threshold. - HIGH_WARNING: - The value has crossed above the high warning threshold. - - LOW_ALARM: The value has crossed below the low alarm - threshold. - HIGH_ALARM: The value has crossed above the - high alarm threshold. Check the State enum for the list of - possible values. + transceiver. Possible states include: + + :: + + - OK: The value has not crossed a warning threshold. + - LOW_WARNING: The value has crossed below the low + warning threshold. + - HIGH_WARNING: The value has + crossed above the high warning threshold. + - LOW_ALARM: The value has crossed below the low alarm + threshold. + - HIGH_ALARM: The value has crossed above the high alarm + threshold. + + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. value (float): @@ -61624,12 +69360,19 @@ class InterconnectDiagnosticsLinkOpticalPower(proto.Message): class State(proto.Enum): r"""The status of the current value when compared to the warning and alarm levels for the receiving or transmitting transceiver. Possible - states include: - OK: The value has not crossed a warning threshold. - - LOW_WARNING: The value has crossed below the low warning - threshold. - HIGH_WARNING: The value has crossed above the high - warning threshold. - LOW_ALARM: The value has crossed below the low - alarm threshold. - HIGH_ALARM: The value has crossed above the high - alarm threshold. + states include: + + :: + + - OK: The value has not crossed a warning threshold. + - LOW_WARNING: The value has crossed below the low + warning threshold. + - HIGH_WARNING: The value has + crossed above the high warning threshold. + - LOW_ALARM: The value has crossed below the low alarm + threshold. + - HIGH_ALARM: The value has crossed above the high alarm + threshold. Values: UNDEFINED_STATE (0): @@ -61758,146 +69501,829 @@ class OperationalStatus(proto.Enum): proto.MESSAGE, number=361210415, optional=True, - message="InterconnectDiagnosticsLinkLACPStatus", + message="InterconnectDiagnosticsLinkLACPStatus", + ) + macsec: "InterconnectDiagnosticsMacsecStatus" = proto.Field( + proto.MESSAGE, + number=528867490, + optional=True, + message="InterconnectDiagnosticsMacsecStatus", + ) + operational_status: str = proto.Field( + proto.STRING, + number=201070847, + optional=True, + ) + receiving_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( + proto.MESSAGE, + number=244717279, + optional=True, + message="InterconnectDiagnosticsLinkOpticalPower", + ) + transmitting_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( + proto.MESSAGE, + number=459431197, + optional=True, + message="InterconnectDiagnosticsLinkOpticalPower", + ) + + +class InterconnectDiagnosticsMacsecStatus(proto.Message): + r"""Describes the status of MACsec encryption on the link. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + ckn (str): + Indicates the Connectivity Association Key + Name (CKN) currently being used if MACsec is + operational. + + This field is a member of `oneof`_ ``_ckn``. + operational (bool): + Indicates whether or not MACsec is + operational on this link. + + This field is a member of `oneof`_ ``_operational``. + """ + + ckn: str = proto.Field( + proto.STRING, + number=98566, + optional=True, + ) + operational: bool = proto.Field( + proto.BOOL, + number=129704914, + optional=True, + ) + + +class InterconnectGroup(proto.Message): + r"""An interconnect group resource allows customers to create, + analyze, and expand their redundant connections. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + + This field is a member of `oneof`_ ``_configured``. + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + etag (str): + Opaque system-generated token that uniquely + identifies the configuration. If provided when + patching a configuration in update mode, the + provided token must match the current token or + the update is rejected. This provides a reliable + means of doing read-modify-write (optimistic + locking) as described by AIP 154. + + This field is a member of `oneof`_ ``_etag``. + id (int): + [Output Only] The unique identifier for the resource type. + The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): + + This field is a member of `oneof`_ ``_intent``. + interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectGroupInterconnect]): + Interconnects in the InterconnectGroup. Keys + are arbitrary user-specified strings. Users are + encouraged, but not required, to use their + preferred format for resource links as keys. + Note that there are add-members and + remove-members methods in gcloud. The size of + this map is limited by an "Interconnects per + group" quota. + kind (str): + [Output Only] Type of the resource. Always + compute#InterconnectGroup + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + physical_structure (google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructure): + + This field is a member of `oneof`_ ``_physical_structure``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + """ + + configured: "InterconnectGroupConfigured" = proto.Field( + proto.MESSAGE, + number=295631422, + optional=True, + message="InterconnectGroupConfigured", + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + intent: "InterconnectGroupIntent" = proto.Field( + proto.MESSAGE, + number=426849948, + optional=True, + message="InterconnectGroupIntent", + ) + interconnects: MutableMapping[ + str, "InterconnectGroupInterconnect" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=520187301, + message="InterconnectGroupInterconnect", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + physical_structure: "InterconnectGroupPhysicalStructure" = proto.Field( + proto.MESSAGE, + number=195307531, + optional=True, + message="InterconnectGroupPhysicalStructure", + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + + +class InterconnectGroupConfigured(proto.Message): + r"""[Output Only] The status of the group as configured. This has the + same structure as the operational field reported by the + OperationalStatus method, but does not take into account the + operational status of each resource. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + topology_capability (google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapability): + + This field is a member of `oneof`_ ``_topology_capability``. + """ + + topology_capability: "InterconnectGroupConfiguredTopologyCapability" = proto.Field( + proto.MESSAGE, + number=144190696, + optional=True, + message="InterconnectGroupConfiguredTopologyCapability", + ) + + +class InterconnectGroupConfiguredTopologyCapability(proto.Message): + r"""[Output Only] How reliable this topology is configured to be, and + why this group does or does not meet the requirements for the + intended capability. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + intended_capability_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers]): + + supported_sla (str): + Check the SupportedSla enum for the list of + possible values. + + This field is a member of `oneof`_ ``_supported_sla``. + """ + + class SupportedSla(proto.Enum): + r""" + + Values: + UNDEFINED_SUPPORTED_SLA (0): + A value indicating that the enum field is not + set. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_SUPPORTED_SLA = 0 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + UNSPECIFIED = 526786327 + + intended_capability_blockers: MutableSequence[ + "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" + ] = proto.RepeatedField( + proto.MESSAGE, + number=531644140, + message="InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", + ) + supported_sla: str = proto.Field( + proto.STRING, + number=59292183, + optional=True, + ) + + +class InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers( + proto.Message +): + r"""[Output Only] Reasons why configuration.topologyCapability.sla + differs from intent.topologyCapability. This list is empty if and + only if those are the same. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + blocker_type (str): + Check the BlockerType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_blocker_type``. + documentation_link (str): + [Output Only] The url of Google Cloud public documentation + explaining this requirement. This is set for every type of + requirement. + + This field is a member of `oneof`_ ``_documentation_link``. + explanation (str): + [Output Only] A human-readable explanation of this + requirement and why it's not met. This is set for every type + of requirement. + + This field is a member of `oneof`_ ``_explanation``. + facilities (MutableSequence[str]): + [Output Only] Facilities used to explain this blocker in + more detail. Like + physicalStructure.metros.facilities.facility, this is a + numeric string like "5467". + interconnects (MutableSequence[str]): + [Output Only] Interconnects used to explain this blocker in + more detail. + metros (MutableSequence[str]): + [Output Only] Metros used to explain this blocker in more + detail. These are three-letter lowercase strings like "iad". + A blocker like INCOMPATIBLE_METROS will specify the + problematic metros in this field. + zones (MutableSequence[str]): + [Output Only] Zones used to explain this blocker in more + detail. Zone names are "zone1" and/or "zone2". + """ + + class BlockerType(proto.Enum): + r""" + + Values: + UNDEFINED_BLOCKER_TYPE (0): + A value indicating that the enum field is not + set. + INCOMPATIBLE_METROS (290410432): + No description available. + NOT_AVAILABLE (140722205): + No description available. + NO_INTERCONNECTS (523549575): + No description available. + NO_INTERCONNECTS_IN_METRO_AND_ZONE (440966492): + No description available. + OTHER (75532016): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_BLOCKER_TYPE = 0 + INCOMPATIBLE_METROS = 290410432 + NOT_AVAILABLE = 140722205 + NO_INTERCONNECTS = 523549575 + NO_INTERCONNECTS_IN_METRO_AND_ZONE = 440966492 + OTHER = 75532016 + UNSPECIFIED = 526786327 + + blocker_type: str = proto.Field( + proto.STRING, + number=381194847, + optional=True, + ) + documentation_link: str = proto.Field( + proto.STRING, + number=93465183, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=504745497, + optional=True, + ) + facilities: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=536683137, + ) + interconnects: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=520187301, + ) + metros: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=533067386, + ) + zones: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=116085319, + ) + + +class InterconnectGroupIntent(proto.Message): + r"""The user's intent for this group. This is the only required + field besides the name that must be specified on group creation. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + topology_capability (str): + Check the TopologyCapability enum for the + list of possible values. + + This field is a member of `oneof`_ ``_topology_capability``. + """ + + class TopologyCapability(proto.Enum): + r""" + + Values: + UNDEFINED_TOPOLOGY_CAPABILITY (0): + A value indicating that the enum field is not + set. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_TOPOLOGY_CAPABILITY = 0 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + UNSPECIFIED = 526786327 + + topology_capability: str = proto.Field( + proto.STRING, + number=144190696, + optional=True, + ) + + +class InterconnectGroupInterconnect(proto.Message): + r"""An Interconnect in this InterconnectGroup. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + interconnect (str): + The URL of an Interconnect in this group. All + Interconnects in the group are unique. + + This field is a member of `oneof`_ ``_interconnect``. + """ + + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + optional=True, + ) + + +class InterconnectGroupPhysicalStructure(proto.Message): + r"""[Output Only] An analysis of the physical layout of Interconnects in + this group. Every Interconnect in the group is shown once in this + structure. + + Attributes: + metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetros]): + + """ + + metros: MutableSequence[ + "InterconnectGroupPhysicalStructureMetros" + ] = proto.RepeatedField( + proto.MESSAGE, + number=533067386, + message="InterconnectGroupPhysicalStructureMetros", + ) + + +class InterconnectGroupPhysicalStructureMetros(proto.Message): + r"""[Output Only] The metros Interconnects in this group are in. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilities]): + + metro (str): + [Output Only] The name of the metro, as a three-letter + lowercase string like "iad". This is the first component of + the location of Interconnects underneath this. + + This field is a member of `oneof`_ ``_metro``. + """ + + facilities: MutableSequence[ + "InterconnectGroupPhysicalStructureMetrosFacilities" + ] = proto.RepeatedField( + proto.MESSAGE, + number=536683137, + message="InterconnectGroupPhysicalStructureMetrosFacilities", + ) + metro: str = proto.Field( + proto.STRING, + number=103787801, + optional=True, + ) + + +class InterconnectGroupPhysicalStructureMetrosFacilities(proto.Message): + r"""[Output Only] The facilities Interconnects in this metro are present + in. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + facility (str): + [Output Only] The ID of this facility, as a numeric string + like "5467". This is the third component of the location of + Interconnects in this facility. + + This field is a member of `oneof`_ ``_facility``. + zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilitiesZones]): + + """ + + facility: str = proto.Field( + proto.STRING, + number=501116579, + optional=True, ) - macsec: "InterconnectDiagnosticsMacsecStatus" = proto.Field( + zones: MutableSequence[ + "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" + ] = proto.RepeatedField( proto.MESSAGE, - number=528867490, - optional=True, - message="InterconnectDiagnosticsMacsecStatus", + number=116085319, + message="InterconnectGroupPhysicalStructureMetrosFacilitiesZones", ) - operational_status: str = proto.Field( + + +class InterconnectGroupPhysicalStructureMetrosFacilitiesZones(proto.Message): + r"""[Output Only] The zones that Interconnects in this facility are + present in. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + interconnects (MutableSequence[str]): + [Output Only] URLs of Interconnects in this redundancy group + in the given metro, facility, and zone. + zone (str): + [Output Only] The name of the zone, either "zone1" or + "zone2". This is the second component of the location of + Interconnects in this facility. + + This field is a member of `oneof`_ ``_zone``. + """ + + interconnects: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=201070847, - optional=True, - ) - receiving_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( - proto.MESSAGE, - number=244717279, - optional=True, - message="InterconnectDiagnosticsLinkOpticalPower", + number=520187301, ) - transmitting_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( - proto.MESSAGE, - number=459431197, + zone: str = proto.Field( + proto.STRING, + number=3744684, optional=True, - message="InterconnectDiagnosticsLinkOpticalPower", ) -class InterconnectDiagnosticsMacsecStatus(proto.Message): - r"""Describes the status of MACsec encryption on the link. +class InterconnectGroupsCreateMembers(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ckn (str): - Indicates the Connectivity Association Key - Name (CKN) currently being used if MACsec is - operational. + intent_mismatch_behavior (str): + How to behave when + configured.topologyCapability.supportedSLA would + not equal intent.topologyCapability after this + call. Check the IntentMismatchBehavior enum for + the list of possible values. - This field is a member of `oneof`_ ``_ckn``. - operational (bool): - Indicates whether or not MACsec is - operational on this link. + This field is a member of `oneof`_ ``_intent_mismatch_behavior``. + interconnects (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput]): - This field is a member of `oneof`_ ``_operational``. + template_interconnect (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput): + Parameters for the Interconnects to create. + + This field is a member of `oneof`_ ``_template_interconnect``. """ - ckn: str = proto.Field( + class IntentMismatchBehavior(proto.Enum): + r"""How to behave when configured.topologyCapability.supportedSLA + would not equal intent.topologyCapability after this call. + + Values: + UNDEFINED_INTENT_MISMATCH_BEHAVIOR (0): + A value indicating that the enum field is not + set. + CREATE (385389820): + No description available. + REJECT (266102687): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_INTENT_MISMATCH_BEHAVIOR = 0 + CREATE = 385389820 + REJECT = 266102687 + UNSPECIFIED = 526786327 + + intent_mismatch_behavior: str = proto.Field( proto.STRING, - number=98566, + number=164408000, optional=True, ) - operational: bool = proto.Field( - proto.BOOL, - number=129704914, - optional=True, + interconnects: MutableSequence[ + "InterconnectGroupsCreateMembersInterconnectInput" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520187301, + message="InterconnectGroupsCreateMembersInterconnectInput", + ) + template_interconnect: "InterconnectGroupsCreateMembersInterconnectInput" = ( + proto.Field( + proto.MESSAGE, + number=224745523, + optional=True, + message="InterconnectGroupsCreateMembersInterconnectInput", + ) ) -class InterconnectGroup(proto.Message): - r"""An interconnect group resource allows customers to create, - analyze, and expand their redundant connections. - +class InterconnectGroupsCreateMembersInterconnectInput(proto.Message): + r"""LINT.IfChange .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + admin_enabled (bool): + Administrative status of the interconnect. + When this is set to true, the Interconnect is + functional and can carry traffic. When set to + false, no packets can be carried over the + interconnect and no BGP routes are exchanged + over it. By default, the status is set to true. - This field is a member of `oneof`_ ``_configured``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + This field is a member of `oneof`_ ``_admin_enabled``. + customer_name (str): + Customer name, to put in the Letter of + Authorization as the party authorized to request + a crossconnect. - This field is a member of `oneof`_ ``_creation_timestamp``. + This field is a member of `oneof`_ ``_customer_name``. description (str): An optional description of this resource. Provide this property when you create the resource. This field is a member of `oneof`_ ``_description``. - etag (str): - Opaque system-generated token that uniquely - identifies the configuration. If provided when - patching a configuration in update mode, the - provided token must match the current token or - the update is rejected. This provides a reliable - means of doing read-modify-write (optimistic - locking) as described by API 154. + facility (str): + A zone-free location to use for all + Interconnects created in this call, like + "iad-1234". - This field is a member of `oneof`_ ``_etag``. - id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + This field is a member of `oneof`_ ``_facility``. + interconnect_type (str): + Type of interconnect, which can take one of the following + values: - This field is a member of `oneof`_ ``_id``. - intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): + :: - This field is a member of `oneof`_ ``_intent``. - interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectGroupInterconnect]): - Interconnects in the InterconnectGroup. Keys - are arbitrary user-specified strings. Users are - encouraged, but not required, to use their - preferred format for resource links as keys. - Note that there are add-members and - remove-members methods in gcloud. The size of - this map is limited by an "Interconnects per - group" quota. - kind (str): - [Output Only] Type of the resource. Always - compute#InterconnectGroup + - PARTNER: A partner-managed interconnection shared between + customers though a partner. + - DEDICATED: A dedicated physical + interconnection with the customer. - This field is a member of `oneof`_ ``_kind``. + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Check the InterconnectType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_interconnect_type``. + link_type (str): + Type of link requested, which can take one of the following + values: + + :: + + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 + optics. + + Note that this field indicates the speed of each of the + links in the bundle, not the speed of the entire bundle. + Check the LinkType enum for the list of possible values. + + This field is a member of `oneof`_ ``_link_type``. name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + Name of the Interconnects to be created. This must be + specified on the template and/or on each individual + interconnect. The name, if not empty, must be 1-63 + characters long, and comply with RFC1035. Specifically, any + nonempty name must be 1-63 characters long and match the + regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which + means the first character must be a lowercase letter, and + all following characters must be a dash, lowercase letter, + or digit, except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - physical_structure (google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructure): + noc_contact_email (str): + Email address to contact the customer NOC for + operations and maintenance notifications + regarding this Interconnect. If specified, this + will be used for notifications in addition to + all other forms described, such as Cloud + Monitoring logs alerting and Cloud + Notifications. This field is required for users + who sign up for Cloud Interconnect using + workforce identity federation. - This field is a member of `oneof`_ ``_physical_structure``. - self_link (str): - [Output Only] Server-defined URL for the resource. + This field is a member of `oneof`_ ``_noc_contact_email``. + remote_location (str): + Indicates that this is a Cross-Cloud + Interconnect. This field specifies the location + outside of Google's network that the + interconnect is connected to. - This field is a member of `oneof`_ ``_self_link``. + This field is a member of `oneof`_ ``_remote_location``. + requested_features (MutableSequence[str]): + Optional. List of features requested for this Interconnect + connection, which can take one of the following values: + + :: + + - IF_MACSEC: If specified, then the connection is created on MACsec + capable hardware ports. If not specified, non-MACsec capable ports will + also be considered. + - IF_CROSS_SITE_NETWORK: If specified, then the connection is created + exclusively for Cross-Site Networking. The connection can not be used for + Cross-Site Networking unless this feature is specified. + + Check the RequestedFeatures enum for the list of possible + values. + requested_link_count (int): + Target number of physical links in the link + bundle, as requested by the customer. + + This field is a member of `oneof`_ ``_requested_link_count``. """ - configured: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, + class InterconnectType(proto.Enum): + r"""Type of interconnect, which can take one of the following values: + + :: + + - PARTNER: A partner-managed interconnection shared between + customers though a partner. + - DEDICATED: A dedicated physical + interconnection with the customer. + + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. + + Values: + UNDEFINED_INTERCONNECT_TYPE (0): + A value indicating that the enum field is not + set. + DEDICATED (258411983): + A dedicated physical interconnection with the + customer. + IT_PRIVATE (335677007): + [Deprecated] A private, physical interconnection with the + customer. + PARTNER (461924520): + A partner-managed interconnection shared + between customers via partner. + """ + UNDEFINED_INTERCONNECT_TYPE = 0 + DEDICATED = 258411983 + IT_PRIVATE = 335677007 + PARTNER = 461924520 + + class LinkType(proto.Enum): + r"""Type of link requested, which can take one of the following values: + + :: + + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 + optics. + + Note that this field indicates the speed of each of the links in the + bundle, not the speed of the entire bundle. + + Values: + UNDEFINED_LINK_TYPE (0): + A value indicating that the enum field is not + set. + LINK_TYPE_ETHERNET_100G_LR (337672551): + 100G Ethernet, LR Optics. + LINK_TYPE_ETHERNET_10G_LR (236739749): + 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; + LINK_TYPE_ETHERNET_400G_LR4 (127023690): + 400G Ethernet, LR4 Optics. + """ + UNDEFINED_LINK_TYPE = 0 + LINK_TYPE_ETHERNET_100G_LR = 337672551 + LINK_TYPE_ETHERNET_10G_LR = 236739749 + LINK_TYPE_ETHERNET_400G_LR4 = 127023690 + + class RequestedFeatures(proto.Enum): + r""" + + Values: + UNDEFINED_REQUESTED_FEATURES (0): + A value indicating that the enum field is not + set. + IF_CROSS_SITE_NETWORK (469111095): + Cross-Site Networking + IF_L2_FORWARDING (125563860): + L2 Interconnect Attachment Forwarding + IF_MACSEC (396279300): + Media Access Control security (MACsec) + """ + UNDEFINED_REQUESTED_FEATURES = 0 + IF_CROSS_SITE_NETWORK = 469111095 + IF_L2_FORWARDING = 125563860 + IF_MACSEC = 396279300 + + admin_enabled: bool = proto.Field( + proto.BOOL, + number=445675089, optional=True, - message="InterconnectGroupConfigured", ) - creation_timestamp: str = proto.Field( + customer_name: str = proto.Field( proto.STRING, - number=30525366, + number=3665484, optional=True, ) description: str = proto.Field( @@ -61905,33 +70331,19 @@ class InterconnectGroup(proto.Message): number=422937596, optional=True, ) - etag: str = proto.Field( + facility: str = proto.Field( proto.STRING, - number=3123477, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - intent: "InterconnectGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, + number=501116579, optional=True, - message="InterconnectGroupIntent", ) - interconnects: MutableMapping[ - str, "InterconnectGroupInterconnect" - ] = proto.MapField( + interconnect_type: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=520187301, - message="InterconnectGroupInterconnect", + number=515165259, + optional=True, ) - kind: str = proto.Field( + link_type: str = proto.Field( proto.STRING, - number=3292052, + number=523207775, optional=True, ) name: str = proto.Field( @@ -61939,580 +70351,571 @@ class InterconnectGroup(proto.Message): number=3373707, optional=True, ) - physical_structure: "InterconnectGroupPhysicalStructure" = proto.Field( - proto.MESSAGE, - number=195307531, + noc_contact_email: str = proto.Field( + proto.STRING, + number=14072832, optional=True, - message="InterconnectGroupPhysicalStructure", ) - self_link: str = proto.Field( + remote_location: str = proto.Field( proto.STRING, - number=456214797, + number=324388750, + optional=True, + ) + requested_features: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=461240814, + ) + requested_link_count: int = proto.Field( + proto.INT32, + number=45051387, optional=True, ) -class InterconnectGroupConfigured(proto.Message): - r"""[Output Only] The status of the group as configured. This has the - same structure as the operational field reported by the - OperationalStatus method, but does not take into account the - operational status of each resource. - +class InterconnectGroupsCreateMembersRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - topology_capability (google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapability): + request (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembers): - This field is a member of `oneof`_ ``_topology_capability``. + This field is a member of `oneof`_ ``_request``. """ - topology_capability: "InterconnectGroupConfiguredTopologyCapability" = proto.Field( + request: "InterconnectGroupsCreateMembers" = proto.Field( proto.MESSAGE, - number=144190696, + number=21951119, optional=True, - message="InterconnectGroupConfiguredTopologyCapability", + message="InterconnectGroupsCreateMembers", ) -class InterconnectGroupConfiguredTopologyCapability(proto.Message): - r"""[Output Only] How reliable this topology is configured to be, and - why this group does or does not meet the requirements for the - intended capability. +class InterconnectGroupsGetOperationalStatusResponse(proto.Message): + r"""Response for the + InterconnectGroupsGetOperationalStatusResponse. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - intended_capability_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers]): + etag (str): - supported_sla (str): - Check the SupportedSla enum for the list of - possible values. + This field is a member of `oneof`_ ``_etag``. + result (google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatus): - This field is a member of `oneof`_ ``_supported_sla``. + This field is a member of `oneof`_ ``_result``. """ - class SupportedSla(proto.Enum): - r""" - - Values: - UNDEFINED_SUPPORTED_SLA (0): - A value indicating that the enum field is not - set. - NO_SLA (161460618): - No description available. - PRODUCTION_CRITICAL (470416485): - No description available. - PRODUCTION_NON_CRITICAL (117399223): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_SUPPORTED_SLA = 0 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 - UNSPECIFIED = 526786327 - - intended_capability_blockers: MutableSequence[ - "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" - ] = proto.RepeatedField( - proto.MESSAGE, - number=531644140, - message="InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", - ) - supported_sla: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=59292183, + number=3123477, optional=True, ) + result: "InterconnectGroupsOperationalStatus" = proto.Field( + proto.MESSAGE, + number=139315229, + optional=True, + message="InterconnectGroupsOperationalStatus", + ) -class InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers( - proto.Message -): - r"""[Output Only] Reasons why configuration.topologyCapability.sla - differs from intent.topologyCapability. This list is empty if and - only if those are the same. - +class InterconnectGroupsListResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - blocker_type (str): - Check the BlockerType enum for the list of - possible values. - - This field is a member of `oneof`_ ``_blocker_type``. - documentation_link (str): - [Output Only] The url of Google Cloud public documentation - explaining this requirement. This is set for every type of - requirement. - - This field is a member of `oneof`_ ``_documentation_link``. - explanation (str): - [Output Only] A human-readable explanation of this - requirement and why it's not met. This is set for every type - of requirement. + etag (str): - This field is a member of `oneof`_ ``_explanation``. - facilities (MutableSequence[str]): - [Output Only] Facilities used to explain this blocker in - more detail. Like - physicalStructure.metros.facilities.facility, this is a - numeric string like "5467". - interconnects (MutableSequence[str]): - [Output Only] Interconnects used to explain this blocker in - more detail. - metros (MutableSequence[str]): - [Output Only] Metros used to explain this blocker in more - detail. These are three-letter lowercase strings like "iad". - A blocker like INCOMPATIBLE_METROS will specify the - problematic metros in this field. - zones (MutableSequence[str]): - [Output Only] Zones used to explain this blocker in more - detail. Zone names are "zone1" and/or "zone2". - """ + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - class BlockerType(proto.Enum): - r""" + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroup]): + A list of InterconnectGroup resources. + kind (str): - Values: - UNDEFINED_BLOCKER_TYPE (0): - A value indicating that the enum field is not - set. - INCOMPATIBLE_METROS (290410432): - No description available. - NOT_AVAILABLE (140722205): - No description available. - NO_INTERCONNECTS (523549575): - No description available. - NO_INTERCONNECTS_IN_METRO_AND_ZONE (440966492): - No description available. - OTHER (75532016): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_BLOCKER_TYPE = 0 - INCOMPATIBLE_METROS = 290410432 - NOT_AVAILABLE = 140722205 - NO_INTERCONNECTS = 523549575 - NO_INTERCONNECTS_IN_METRO_AND_ZONE = 440966492 - OTHER = 75532016 - UNSPECIFIED = 526786327 + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - blocker_type: str = proto.Field( + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. end_interface: + MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=381194847, + number=3123477, optional=True, ) - documentation_link: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=93465183, + number=3355, optional=True, ) - explanation: str = proto.Field( + items: MutableSequence["InterconnectGroup"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InterconnectGroup", + ) + kind: str = proto.Field( proto.STRING, - number=504745497, + number=3292052, optional=True, ) - facilities: MutableSequence[str] = proto.RepeatedField( + next_page_token: str = proto.Field( proto.STRING, - number=536683137, + number=79797525, + optional=True, ) - interconnects: MutableSequence[str] = proto.RepeatedField( + self_link: str = proto.Field( proto.STRING, - number=520187301, + number=456214797, + optional=True, ) - metros: MutableSequence[str] = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=533067386, + number=243372063, ) - zones: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=116085319, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class InterconnectGroupIntent(proto.Message): - r"""The user's intent for this group. This is the only required - field besides the name that must be specified on group creation. +class InterconnectGroupsOperationalStatus(proto.Message): + r"""Request to get the status of the interconnect group with + extra detail. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - topology_capability (str): - Check the TopologyCapability enum for the - list of possible values. + configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + The configuration analysis, as returned by + Get. - This field is a member of `oneof`_ ``_topology_capability``. + This field is a member of `oneof`_ ``_configured``. + group_status (str): + Summarizes the status of the group. + Check the GroupStatus enum for the list of + possible values. + + This field is a member of `oneof`_ ``_group_status``. + intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): + The intent of the resource, as returned by + Get. + + This field is a member of `oneof`_ ``_intent``. + interconnect_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatusInterconnectStatus]): + + operational (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + The operational state of the group, including + only active Interconnects. + + This field is a member of `oneof`_ ``_operational``. """ - class TopologyCapability(proto.Enum): - r""" + class GroupStatus(proto.Enum): + r"""Summarizes the status of the group. Values: - UNDEFINED_TOPOLOGY_CAPABILITY (0): + UNDEFINED_GROUP_STATUS (0): A value indicating that the enum field is not set. - NO_SLA (161460618): + DEGRADED (396890926): No description available. - PRODUCTION_CRITICAL (470416485): + FULLY_DOWN (255514647): No description available. - PRODUCTION_NON_CRITICAL (117399223): + FULLY_UP (504176464): No description available. - UNSPECIFIED (526786327): + GROUPS_STATUS_UNSPECIFIED (261932693): No description available. """ - UNDEFINED_TOPOLOGY_CAPABILITY = 0 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 - UNSPECIFIED = 526786327 + UNDEFINED_GROUP_STATUS = 0 + DEGRADED = 396890926 + FULLY_DOWN = 255514647 + FULLY_UP = 504176464 + GROUPS_STATUS_UNSPECIFIED = 261932693 - topology_capability: str = proto.Field( + configured: "InterconnectGroupConfigured" = proto.Field( + proto.MESSAGE, + number=295631422, + optional=True, + message="InterconnectGroupConfigured", + ) + group_status: str = proto.Field( proto.STRING, - number=144190696, + number=338778546, + optional=True, + ) + intent: "InterconnectGroupIntent" = proto.Field( + proto.MESSAGE, + number=426849948, + optional=True, + message="InterconnectGroupIntent", + ) + interconnect_statuses: MutableSequence[ + "InterconnectGroupsOperationalStatusInterconnectStatus" + ] = proto.RepeatedField( + proto.MESSAGE, + number=446756017, + message="InterconnectGroupsOperationalStatusInterconnectStatus", + ) + operational: "InterconnectGroupConfigured" = proto.Field( + proto.MESSAGE, + number=129704914, optional=True, + message="InterconnectGroupConfigured", ) -class InterconnectGroupInterconnect(proto.Message): - r"""An Interconnect in this InterconnectGroup. +class InterconnectGroupsOperationalStatusInterconnectStatus(proto.Message): + r"""The status of one Interconnect in the group. The order is + arbitrary. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + admin_enabled (bool): + Whether the Interconnect is enabled. + + This field is a member of `oneof`_ ``_admin_enabled``. + diagnostics (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + The diagnostics of the Interconnect, as + returned by the existing get-diagnostics method. + + This field is a member of `oneof`_ ``_diagnostics``. interconnect (str): - The URL of an Interconnect in this group. All - Interconnects in the group are unique. + The URL of the Interconnect being described. This field is a member of `oneof`_ ``_interconnect``. + is_active (str): + Whether this interconnect is participating in + the redundant configuration. + Check the IsActive enum for the list of possible + values. + + This field is a member of `oneof`_ ``_is_active``. """ + class IsActive(proto.Enum): + r"""Whether this interconnect is participating in the redundant + configuration. + + Values: + UNDEFINED_IS_ACTIVE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + No description available. + INACTIVE (270421099): + No description available. + IS_ACTIVE_UNSPECIFIED (274948243): + No description available. + """ + UNDEFINED_IS_ACTIVE = 0 + ACTIVE = 314733318 + INACTIVE = 270421099 + IS_ACTIVE_UNSPECIFIED = 274948243 + + admin_enabled: bool = proto.Field( + proto.BOOL, + number=445675089, + optional=True, + ) + diagnostics: "InterconnectDiagnostics" = proto.Field( + proto.MESSAGE, + number=333355436, + optional=True, + message="InterconnectDiagnostics", + ) interconnect: str = proto.Field( proto.STRING, number=224601230, optional=True, ) + is_active: str = proto.Field( + proto.STRING, + number=114830267, + optional=True, + ) -class InterconnectGroupPhysicalStructure(proto.Message): - r"""[Output Only] An analysis of the physical layout of Interconnects in - this group. Every Interconnect in the group is shown once in this - structure. - - Attributes: - metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetros]): +class InterconnectList(proto.Message): + r"""Response to the list request, and contains a list of + interconnects. - """ - metros: MutableSequence[ - "InterconnectGroupPhysicalStructureMetros" - ] = proto.RepeatedField( - proto.MESSAGE, - number=533067386, - message="InterconnectGroupPhysicalStructureMetros", - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. -class InterconnectGroupPhysicalStructureMetros(proto.Message): - r"""[Output Only] The metros Interconnects in this group are in. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Interconnect]): + A list of Interconnect resources. + kind (str): + [Output Only] Type of resource. + Alwayscompute#interconnectList for lists of interconnects. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - Attributes: - facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilities]): + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. - metro (str): - [Output Only] The name of the metro, as a three-letter - lowercase string like "iad". This is the first component of - the location of Interconnects underneath this. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_metro``. + This field is a member of `oneof`_ ``_warning``. """ - facilities: MutableSequence[ - "InterconnectGroupPhysicalStructureMetrosFacilities" - ] = proto.RepeatedField( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["Interconnect"] = proto.RepeatedField( proto.MESSAGE, - number=536683137, - message="InterconnectGroupPhysicalStructureMetrosFacilities", + number=100526016, + message="Interconnect", ) - metro: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=103787801, + number=3292052, optional=True, ) - - -class InterconnectGroupPhysicalStructureMetrosFacilities(proto.Message): - r"""[Output Only] The facilities Interconnects in this metro are present - in. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - facility (str): - [Output Only] The ID of this facility, as a numeric string - like "5467". This is the third component of the location of - Interconnects in this facility. - - This field is a member of `oneof`_ ``_facility``. - zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilitiesZones]): - - """ - - facility: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=501116579, + number=79797525, optional=True, ) - zones: MutableSequence[ - "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" - ] = proto.RepeatedField( + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( proto.MESSAGE, - number=116085319, - message="InterconnectGroupPhysicalStructureMetrosFacilitiesZones", + number=50704284, + optional=True, + message="Warning", ) -class InterconnectGroupPhysicalStructureMetrosFacilitiesZones(proto.Message): - r"""[Output Only] The zones that Interconnects in this facility are - present in. +class InterconnectLocation(proto.Message): + r"""Represents an Interconnect Attachment (VLAN) Location + resource. + You can use this resource to find location details about an + Interconnect attachment (VLAN). For more information about + interconnect attachments, read Creating VLAN Attachments. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnects (MutableSequence[str]): - [Output Only] URLs of Interconnects in this redundancy group - in the given metro, facility, and zone. - zone (str): - [Output Only] The name of the zone, either "zone1" or - "zone2". This is the second component of the location of - Interconnects in this facility. + address (str): + [Output Only] The postal address of the Point of Presence, + each line in the address is separated by a newline + character. - This field is a member of `oneof`_ ``_zone``. - """ + This field is a member of `oneof`_ ``_address``. + availability_zone (str): + [Output Only] Availability zone for this + InterconnectLocation. Within a metropolitan area (metro), + maintenance will not be simultaneously scheduled in more + than one availability zone. Example: "zone1" or "zone2". - interconnects: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=520187301, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - optional=True, - ) + This field is a member of `oneof`_ ``_availability_zone``. + available_features (MutableSequence[str]): + [Output only] List of features available at this + InterconnectLocation, which can take one of the following + values: + :: -class InterconnectGroupsCreateMembers(proto.Message): - r""" + - IF_MACSEC + - IF_CROSS_SITE_NETWORK - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Check the AvailableFeatures enum for the list of possible + values. + available_link_types (MutableSequence[str]): + [Output only] List of link types available at this + InterconnectLocation, which can take one of the following + values: - Attributes: - intent_mismatch_behavior (str): - How to behave when - configured.topologyCapability.supportedSLA would - not equal intent.topologyCapability after this - call. Check the IntentMismatchBehavior enum for - the list of possible values. + :: - This field is a member of `oneof`_ ``_intent_mismatch_behavior``. - interconnects (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput]): + - LINK_TYPE_ETHERNET_10G_LR + - LINK_TYPE_ETHERNET_100G_LR + - LINK_TYPE_ETHERNET_400G_LR4 - template_interconnect (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput): - Parameters for the Interconnects to create. + Check the AvailableLinkTypes enum for the list of possible + values. + city (str): + [Output Only] Metropolitan area designator that indicates + which city an interconnect is located. For example: + "Chicago, IL", "Amsterdam, Netherlands". - This field is a member of `oneof`_ ``_template_interconnect``. - """ + This field is a member of `oneof`_ ``_city``. + continent (str): + [Output Only] Continent for this location, which can take + one of the following values: - class IntentMismatchBehavior(proto.Enum): - r"""How to behave when configured.topologyCapability.supportedSLA - would not equal intent.topologyCapability after this call. + :: - Values: - UNDEFINED_INTENT_MISMATCH_BEHAVIOR (0): - A value indicating that the enum field is not - set. - CREATE (385389820): - No description available. - REJECT (266102687): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_INTENT_MISMATCH_BEHAVIOR = 0 - CREATE = 385389820 - REJECT = 266102687 - UNSPECIFIED = 526786327 + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA - intent_mismatch_behavior: str = proto.Field( - proto.STRING, - number=164408000, - optional=True, - ) - interconnects: MutableSequence[ - "InterconnectGroupsCreateMembersInterconnectInput" - ] = proto.RepeatedField( - proto.MESSAGE, - number=520187301, - message="InterconnectGroupsCreateMembersInterconnectInput", - ) - template_interconnect: "InterconnectGroupsCreateMembersInterconnectInput" = ( - proto.Field( - proto.MESSAGE, - number=224745523, - optional=True, - message="InterconnectGroupsCreateMembersInterconnectInput", - ) - ) + Check the Continent enum for the list of possible values. + This field is a member of `oneof`_ ``_continent``. + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. -class InterconnectGroupsCreateMembersInterconnectInput(proto.Message): - r"""LINT.IfChange + This field is a member of `oneof`_ ``_creation_timestamp``. + cross_site_interconnect_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationCrossSiteInterconnectInfo]): + [Output Only] A list of + InterconnectLocation.CrossSiteInterconnectInfo objects, that + describe where Cross-Site Interconnect wires may connect to + from this location and associated connection parameters. + Cross-Site Interconnect isn't allowed to locations which are + not listed. + description (str): + [Output Only] An optional description of the resource. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_description``. + facility_provider (str): + [Output Only] The name of the provider for this facility + (e.g., EQUINIX). - Attributes: - admin_enabled (bool): - Administrative status of the interconnect. - When this is set to true, the Interconnect is - functional and can carry traffic. When set to - false, no packets can be carried over the - interconnect and no BGP routes are exchanged - over it. By default, the status is set to true. + This field is a member of `oneof`_ ``_facility_provider``. + facility_provider_facility_id (str): + [Output Only] A provider-assigned Identifier for this + facility (e.g., Ashburn-DC1). - This field is a member of `oneof`_ ``_admin_enabled``. - customer_name (str): - Customer name, to put in the Letter of - Authorization as the party authorized to request - a crossconnect. + This field is a member of `oneof`_ ``_facility_provider_facility_id``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - This field is a member of `oneof`_ ``_customer_name``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + This field is a member of `oneof`_ ``_id``. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#interconnectLocation for interconnect + locations. - This field is a member of `oneof`_ ``_description``. - facility (str): - A zone-free location to use for all - Interconnects created in this call, like - "iad-1234". + This field is a member of `oneof`_ ``_kind``. + name (str): + [Output Only] Name of the resource. - This field is a member of `oneof`_ ``_facility``. - interconnect_type (str): - Type of interconnect, which can take one of the following - values: - PARTNER: A partner-managed interconnection shared - between customers though a partner. - DEDICATED: A dedicated - physical interconnection with the customer. Note that a - value IT_PRIVATE has been deprecated in favor of DEDICATED. - Check the InterconnectType enum for the list of possible - values. + This field is a member of `oneof`_ ``_name``. + peeringdb_facility_id (str): + [Output Only] The peeringdb identifier for this facility + (corresponding with a netfac type in peeringdb). - This field is a member of `oneof`_ ``_interconnect_type``. - link_type (str): - Type of link requested, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR - optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR - optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with - LR4 optics. Note that this field indicates the speed of each - of the links in the bundle, not the speed of the entire - bundle. Check the LinkType enum for the list of possible - values. + This field is a member of `oneof`_ ``_peeringdb_facility_id``. + region_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationRegionInfo]): + [Output Only] A list of InterconnectLocation.RegionInfo + objects, that describe parameters pertaining to the relation + between this InterconnectLocation and various Google Cloud + regions. + self_link (str): + [Output Only] Server-defined URL for the resource. - This field is a member of `oneof`_ ``_link_type``. - name (str): - Name of the Interconnects to be created. This must be - specified on the template and/or on each individual - interconnect. The name, if not empty, must be 1-63 - characters long, and comply with RFC1035. Specifically, any - nonempty name must be 1-63 characters long and match the - regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which - means the first character must be a lowercase letter, and - all following characters must be a dash, lowercase letter, - or digit, except the last character, which cannot be a dash. + This field is a member of `oneof`_ ``_self_link``. + single_region_production_critical_peer_locations (MutableSequence[str]): + [Output Only] URLs of the other locations that can pair up + with this location to support Single-Region 99.99% SLA. E.g. + iad-zone1-1 and iad-zone2-5467 are Single-Region 99.99% peer + locations of each other. + status (str): + [Output Only] The status of this InterconnectLocation, which + can take one of the following values: - This field is a member of `oneof`_ ``_name``. - noc_contact_email (str): - Email address to contact the customer NOC for - operations and maintenance notifications - regarding this Interconnect. If specified, this - will be used for notifications in addition to - all other forms described, such as Cloud - Monitoring logs alerting and Cloud - Notifications. This field is required for users - who sign up for Cloud Interconnect using - workforce identity federation. + :: - This field is a member of `oneof`_ ``_noc_contact_email``. - remote_location (str): - Indicates that this is a Cross-Cloud - Interconnect. This field specifies the location - outside of Google's network that the - interconnect is connected to. + - CLOSED: The InterconnectLocation is closed and is unavailable for + provisioning new Interconnects. + - AVAILABLE: The InterconnectLocation is available for provisioning new + Interconnects. - This field is a member of `oneof`_ ``_remote_location``. - requested_features (MutableSequence[str]): - Optional. List of features requested for this Interconnect - connection, which can take one of the following values: - - IF_MACSEC If specified then the connection is created on - MACsec capable hardware ports. If not specified, the default - value is false, which allocates non-MACsec capable ports - first if available. This parameter can be provided only with - Interconnect INSERT. It isn't valid for Interconnect PATCH. - Check the RequestedFeatures enum for the list of possible - values. - requested_link_count (int): - Target number of physical links in the link - bundle, as requested by the customer. + Check the Status enum for the list of possible values. - This field is a member of `oneof`_ ``_requested_link_count``. + This field is a member of `oneof`_ ``_status``. + supports_pzs (bool): + [Output Only] Reserved for future use. + + This field is a member of `oneof`_ ``_supports_pzs``. """ - class InterconnectType(proto.Enum): - r"""Type of interconnect, which can take one of the following values: - - PARTNER: A partner-managed interconnection shared between customers - though a partner. - DEDICATED: A dedicated physical interconnection - with the customer. Note that a value IT_PRIVATE has been deprecated - in favor of DEDICATED. + class AvailableFeatures(proto.Enum): + r""" Values: - UNDEFINED_INTERCONNECT_TYPE (0): + UNDEFINED_AVAILABLE_FEATURES (0): A value indicating that the enum field is not set. - DEDICATED (258411983): - A dedicated physical interconnection with the - customer. - IT_PRIVATE (335677007): - [Deprecated] A private, physical interconnection with the - customer. - PARTNER (461924520): - A partner-managed interconnection shared - between customers via partner. + IF_CROSS_SITE_NETWORK (469111095): + Cross-Site Networking + IF_L2_FORWARDING (125563860): + L2 Interconnect Attachment Forwarding + IF_MACSEC (396279300): + Media Access Control security (MACsec) """ - UNDEFINED_INTERCONNECT_TYPE = 0 - DEDICATED = 258411983 - IT_PRIVATE = 335677007 - PARTNER = 461924520 + UNDEFINED_AVAILABLE_FEATURES = 0 + IF_CROSS_SITE_NETWORK = 469111095 + IF_L2_FORWARDING = 125563860 + IF_MACSEC = 396279300 - class LinkType(proto.Enum): - r"""Type of link requested, which can take one of the following values: - - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note - that this field indicates the speed of each of the links in the - bundle, not the speed of the entire bundle. + class AvailableLinkTypes(proto.Enum): + r""" Values: - UNDEFINED_LINK_TYPE (0): + UNDEFINED_AVAILABLE_LINK_TYPES (0): A value indicating that the enum field is not set. LINK_TYPE_ETHERNET_100G_LR (337672551): @@ -62522,55 +70925,149 @@ class LinkType(proto.Enum): LINK_TYPE_ETHERNET_400G_LR4 (127023690): 400G Ethernet, LR4 Optics. """ - UNDEFINED_LINK_TYPE = 0 + UNDEFINED_AVAILABLE_LINK_TYPES = 0 LINK_TYPE_ETHERNET_100G_LR = 337672551 LINK_TYPE_ETHERNET_10G_LR = 236739749 LINK_TYPE_ETHERNET_400G_LR4 = 127023690 - class RequestedFeatures(proto.Enum): - r""" + class Continent(proto.Enum): + r"""[Output Only] Continent for this location, which can take one of the + following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA Values: - UNDEFINED_REQUESTED_FEATURES (0): + UNDEFINED_CONTINENT (0): A value indicating that the enum field is not set. - IF_CROSS_SITE_NETWORK (469111095): - Cross-Site Networking - IF_MACSEC (396279300): - Media Access Control security (MACsec) + AFRICA (317443706): + No description available. + ASIA_PAC (119782269): + No description available. + C_AFRICA (71993846): + No description available. + C_ASIA_PAC (465668089): + No description available. + C_EUROPE (200369438): + No description available. + C_NORTH_AMERICA (275697048): + No description available. + C_SOUTH_AMERICA (397149792): + No description available. + EUROPE (445819298): + No description available. + NORTH_AMERICA (448015508): + No description available. + SOUTH_AMERICA (32597340): + No description available. """ - UNDEFINED_REQUESTED_FEATURES = 0 - IF_CROSS_SITE_NETWORK = 469111095 - IF_MACSEC = 396279300 + UNDEFINED_CONTINENT = 0 + AFRICA = 317443706 + ASIA_PAC = 119782269 + C_AFRICA = 71993846 + C_ASIA_PAC = 465668089 + C_EUROPE = 200369438 + C_NORTH_AMERICA = 275697048 + C_SOUTH_AMERICA = 397149792 + EUROPE = 445819298 + NORTH_AMERICA = 448015508 + SOUTH_AMERICA = 32597340 - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, + class Status(proto.Enum): + r"""[Output Only] The status of this InterconnectLocation, which can + take one of the following values: + + :: + + - CLOSED: The InterconnectLocation is closed and is unavailable for + provisioning new Interconnects. + - AVAILABLE: The InterconnectLocation is available for provisioning new + Interconnects. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + AVAILABLE (442079913): + The InterconnectLocation is available for + provisioning new Interconnects. + CLOSED (380163436): + The InterconnectLocation is closed for + provisioning new Interconnects. + """ + UNDEFINED_STATUS = 0 + AVAILABLE = 442079913 + CLOSED = 380163436 + + address: str = proto.Field( + proto.STRING, + number=462920692, optional=True, ) - customer_name: str = proto.Field( + availability_zone: str = proto.Field( proto.STRING, - number=3665484, + number=158459920, + optional=True, + ) + available_features: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=496344307, + ) + available_link_types: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=509504298, + ) + city: str = proto.Field( + proto.STRING, + number=3053931, optional=True, ) + continent: str = proto.Field( + proto.STRING, + number=133442996, + optional=True, + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + cross_site_interconnect_infos: MutableSequence[ + "InterconnectLocationCrossSiteInterconnectInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=248573837, + message="InterconnectLocationCrossSiteInterconnectInfo", + ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - facility: str = proto.Field( + facility_provider: str = proto.Field( proto.STRING, - number=501116579, + number=533303309, optional=True, ) - interconnect_type: str = proto.Field( + facility_provider_facility_id: str = proto.Field( proto.STRING, - number=515165259, + number=87269125, optional=True, ) - link_type: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=523207775, + number=3292052, optional=True, ) name: str = proto.Field( @@ -62578,98 +71075,92 @@ class RequestedFeatures(proto.Enum): number=3373707, optional=True, ) - noc_contact_email: str = proto.Field( + peeringdb_facility_id: str = proto.Field( proto.STRING, - number=14072832, + number=536567094, optional=True, ) - remote_location: str = proto.Field( + region_infos: MutableSequence[ + "InterconnectLocationRegionInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=312194170, + message="InterconnectLocationRegionInfo", + ) + self_link: str = proto.Field( proto.STRING, - number=324388750, + number=456214797, optional=True, ) - requested_features: MutableSequence[str] = proto.RepeatedField( + single_region_production_critical_peer_locations: MutableSequence[ + str + ] = proto.RepeatedField( proto.STRING, - number=461240814, + number=439537103, ) - requested_link_count: int = proto.Field( - proto.INT32, - number=45051387, + status: str = proto.Field( + proto.STRING, + number=181260274, optional=True, ) - - -class InterconnectGroupsCreateMembersRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - request (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembers): - - This field is a member of `oneof`_ ``_request``. - """ - - request: "InterconnectGroupsCreateMembers" = proto.Field( - proto.MESSAGE, - number=21951119, + supports_pzs: bool = proto.Field( + proto.BOOL, + number=83983214, optional=True, - message="InterconnectGroupsCreateMembers", ) -class InterconnectGroupsGetOperationalStatusResponse(proto.Message): - r"""Response for the - InterconnectGroupsGetOperationalStatusResponse. +class InterconnectLocationCrossSiteInterconnectInfo(proto.Message): + r"""Information about Cross-Site Interconnect wires which may be + created between the containing location and another remote + location. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - result (google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatus): + city (str): + The remote location for Cross-Site + Interconnect wires. This specifies an + InterconnectLocation city (metropolitan area + designator), which itself may match multiple + InterconnectLocations. - This field is a member of `oneof`_ ``_result``. + This field is a member of `oneof`_ ``_city``. """ - etag: str = proto.Field( + city: str = proto.Field( proto.STRING, - number=3123477, - optional=True, - ) - result: "InterconnectGroupsOperationalStatus" = proto.Field( - proto.MESSAGE, - number=139315229, + number=3053931, optional=True, - message="InterconnectGroupsOperationalStatus", ) -class InterconnectGroupsListResponse(proto.Message): - r""" +class InterconnectLocationList(proto.Message): + r"""Response to the list request, and contains a list of + interconnect locations. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. id (str): [Output Only] Unique identifier for the resource; defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroup]): - A list of InterconnectGroup resources. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocation]): + A list of InterconnectLocation resources. kind (str): + [Output Only] Type of resource. + Alwayscompute#interconnectLocationList for lists of + interconnect locations. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -62679,9 +71170,6 @@ class InterconnectGroupsListResponse(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -62692,20 +71180,15 @@ class InterconnectGroupsListResponse(proto.Message): def raw_page(self): return self - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items: MutableSequence["InterconnectGroup"] = proto.RepeatedField( + items: MutableSequence["InterconnectLocation"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InterconnectGroup", + message="InterconnectLocation", ) kind: str = proto.Field( proto.STRING, @@ -62719,261 +71202,528 @@ def raw_page(self): ) self_link: str = proto.Field( proto.STRING, - number=456214797, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class InterconnectLocationRegionInfo(proto.Message): + r"""Information about any potential InterconnectAttachments + between an Interconnect at a specific InterconnectLocation, and + a specific Cloud Region. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + expected_rtt_ms (int): + Expected round-trip time in milliseconds, + from this InterconnectLocation to a VM in this + region. + + This field is a member of `oneof`_ ``_expected_rtt_ms``. + l2_forwarding_enabled (bool): + Identifies whether L2 Interconnect + Attachments can be created in this region for + interconnects that are in this location. + + This field is a member of `oneof`_ ``_l2_forwarding_enabled``. + location_presence (str): + Identifies the network presence of this + location. Check the LocationPresence enum for + the list of possible values. + + This field is a member of `oneof`_ ``_location_presence``. + region (str): + URL for the region of this location. + + This field is a member of `oneof`_ ``_region``. + """ + + class LocationPresence(proto.Enum): + r"""Identifies the network presence of this location. + + Values: + UNDEFINED_LOCATION_PRESENCE (0): + A value indicating that the enum field is not + set. + GLOBAL (494663587): + This region is not in any common network + presence with this InterconnectLocation. + LOCAL_REGION (403535464): + This region shares the same regional network + presence as this InterconnectLocation. + LP_GLOBAL (429584062): + [Deprecated] This region is not in any common network + presence with this InterconnectLocation. + LP_LOCAL_REGION (488598851): + [Deprecated] This region shares the same regional network + presence as this InterconnectLocation. + """ + UNDEFINED_LOCATION_PRESENCE = 0 + GLOBAL = 494663587 + LOCAL_REGION = 403535464 + LP_GLOBAL = 429584062 + LP_LOCAL_REGION = 488598851 + + expected_rtt_ms: int = proto.Field( + proto.INT64, + number=422543866, + optional=True, + ) + l2_forwarding_enabled: bool = proto.Field( + proto.BOOL, + number=241364888, + optional=True, + ) + location_presence: str = proto.Field( + proto.STRING, + number=101517893, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + + +class InterconnectMacsec(proto.Message): + r"""Configuration information for enabling Media Access Control + security (MACsec) on this Cloud Interconnect connection between + Google and your on-premises router. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + fail_open (bool): + If set to true, the Interconnect connection + is configured with ashould-secure MACsec + security policy, that allows the Google router + to fallback to cleartext traffic if the MKA + session cannot be established. By default, the + Interconnect connection is configured with + amust-secure security policy that drops all + traffic if the MKA session cannot be established + with your router. + + This field is a member of `oneof`_ ``_fail_open``. + pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecPreSharedKey]): + Required. A keychain placeholder describing a + set of named key objects along with their start + times. A MACsec CKN/CAK is generated for each + key in the key chain. Google router + automatically picks the key with the most recent + startTime when establishing or re-establishing a + MACsec secure link. + """ + + fail_open: bool = proto.Field( + proto.BOOL, + number=532597451, + optional=True, + ) + pre_shared_keys: MutableSequence[ + "InterconnectMacsecPreSharedKey" + ] = proto.RepeatedField( + proto.MESSAGE, + number=420308466, + message="InterconnectMacsecPreSharedKey", + ) + + +class InterconnectMacsecConfig(proto.Message): + r"""MACsec configuration information for the Interconnect + connection. Contains the generated Connectivity Association Key + Name (CKN) and the key (CAK) for this Interconnect connection. + + Attributes: + pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecConfigPreSharedKey]): + A keychain placeholder describing a set of + named key objects along with their start times. + A MACsec CKN/CAK is generated for each key in + the key chain. Google router automatically picks + the key with the most recent startTime when + establishing or re-establishing a MACsec secure + link. + """ + + pre_shared_keys: MutableSequence[ + "InterconnectMacsecConfigPreSharedKey" + ] = proto.RepeatedField( + proto.MESSAGE, + number=420308466, + message="InterconnectMacsecConfigPreSharedKey", + ) + + +class InterconnectMacsecConfigPreSharedKey(proto.Message): + r"""Describes a pre-shared key used to setup MACsec in static + connectivity association key (CAK) mode. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + cak (str): + An auto-generated Connectivity Association + Key (CAK) for this key. + + This field is a member of `oneof`_ ``_cak``. + ckn (str): + An auto-generated Connectivity Association + Key Name (CKN) for this key. + + This field is a member of `oneof`_ ``_ckn``. + name (str): + User provided name for this pre-shared key. + + This field is a member of `oneof`_ ``_name``. + start_time (str): + User provided timestamp on or after which + this key is valid. + + This field is a member of `oneof`_ ``_start_time``. + """ + + cak: str = proto.Field( + proto.STRING, + number=98253, + optional=True, + ) + ckn: str = proto.Field( + proto.STRING, + number=98566, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, + ) + + +class InterconnectMacsecPreSharedKey(proto.Message): + r"""Describes a pre-shared key used to setup MACsec in static + connectivity association key (CAK) mode. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + name (str): + Required. A name for this pre-shared key. The name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + start_time (str): + A RFC3339 timestamp on or after which the key + is valid. startTime can be in the future. If the + keychain has a single key, startTime can be + omitted. If the keychain has multiple keys, + startTime is mandatory for each key. The start + times of keys must be in increasing order. The + start times of two consecutive keys must be at + least 6 hours apart. + + This field is a member of `oneof`_ ``_start_time``. + """ + + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + start_time: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37467274, optional=True, - message="Warning", ) -class InterconnectGroupsOperationalStatus(proto.Message): - r"""Request to get the status of the interconnect group with - extra detail. - +class InterconnectOutageNotification(proto.Message): + r"""Description of a planned outage on this Interconnect. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): - The configuration analysis, as returned by - Get. + affected_circuits (MutableSequence[str]): + If issue_type is IT_PARTIAL_OUTAGE, a list of the + Google-side circuit IDs that will be affected. + description (str): + A description about the purpose of the + outage. - This field is a member of `oneof`_ ``_configured``. - group_status (str): - Summarizes the status of the group. - Check the GroupStatus enum for the list of + This field is a member of `oneof`_ ``_description``. + end_time (int): + Scheduled end time for the outage + (milliseconds since Unix epoch). + + This field is a member of `oneof`_ ``_end_time``. + issue_type (str): + Form this outage is expected to take, which can take one of + the following values: + + :: + + - OUTAGE: The Interconnect may be completely out of service for + some or all of the specified window. + - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole + should remain up, but with reduced bandwidth. + + Note that the versions of this enum prefixed with "IT\_" + have been deprecated in favor of the unprefixed values. + Check the IssueType enum for the list of possible values. + + This field is a member of `oneof`_ ``_issue_type``. + name (str): + Unique identifier for this outage + notification. + + This field is a member of `oneof`_ ``_name``. + source (str): + The party that generated this notification, which can take + the following value: + + :: + + - GOOGLE: this notification as generated by Google. + + Note that the value of NSRC_GOOGLE has been deprecated in + favor of GOOGLE. Check the Source enum for the list of possible values. - This field is a member of `oneof`_ ``_group_status``. - intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): - The intent of the resource, as returned by - Get. + This field is a member of `oneof`_ ``_source``. + start_time (int): + Scheduled start time for the outage + (milliseconds since Unix epoch). - This field is a member of `oneof`_ ``_intent``. - interconnect_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatusInterconnectStatus]): + This field is a member of `oneof`_ ``_start_time``. + state (str): + State of this notification, which can take one of the + following values: - operational (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): - The operational state of the group, including - only active Interconnects. + :: - This field is a member of `oneof`_ ``_operational``. + - ACTIVE: This outage notification is active. The event could be in + the past, present, or future. See start_time and end_time for + scheduling. + - CANCELLED: The outage associated with this notification was cancelled + before the outage was due to start. + - COMPLETED: The outage associated with this notification is complete. + + Note that the versions of this enum prefixed with "NS\_" + have been deprecated in favor of the unprefixed values. + Check the State enum for the list of possible values. + + This field is a member of `oneof`_ ``_state``. """ - class GroupStatus(proto.Enum): - r"""Summarizes the status of the group. + class IssueType(proto.Enum): + r"""Form this outage is expected to take, which can take one of the + following values: + + :: + + - OUTAGE: The Interconnect may be completely out of service for + some or all of the specified window. + - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole + should remain up, but with reduced bandwidth. + + Note that the versions of this enum prefixed with "IT\_" have been + deprecated in favor of the unprefixed values. Values: - UNDEFINED_GROUP_STATUS (0): + UNDEFINED_ISSUE_TYPE (0): A value indicating that the enum field is not set. - DEGRADED (396890926): - No description available. - FULLY_DOWN (255514647): - No description available. - FULLY_UP (504176464): - No description available. - GROUPS_STATUS_UNSPECIFIED (261932693): - No description available. + IT_OUTAGE (175779973): + [Deprecated] The Interconnect may be completely out of + service for some or all of the specified window. + IT_PARTIAL_OUTAGE (92103971): + [Deprecated] Some circuits comprising the Interconnect will + be out of service during the expected window. The + interconnect as a whole should remain up, albeit with + reduced bandwidth. + OUTAGE (195285745): + The Interconnect may be completely out of + service for some or all of the specified window. + PARTIAL_OUTAGE (147053455): + Some circuits comprising the Interconnect + will be out of service during the expected + window. The interconnect as a whole should + remain up, albeit with reduced bandwidth. """ - UNDEFINED_GROUP_STATUS = 0 - DEGRADED = 396890926 - FULLY_DOWN = 255514647 - FULLY_UP = 504176464 - GROUPS_STATUS_UNSPECIFIED = 261932693 - - configured: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, - optional=True, - message="InterconnectGroupConfigured", - ) - group_status: str = proto.Field( - proto.STRING, - number=338778546, - optional=True, - ) - intent: "InterconnectGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, - optional=True, - message="InterconnectGroupIntent", - ) - interconnect_statuses: MutableSequence[ - "InterconnectGroupsOperationalStatusInterconnectStatus" - ] = proto.RepeatedField( - proto.MESSAGE, - number=446756017, - message="InterconnectGroupsOperationalStatusInterconnectStatus", - ) - operational: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=129704914, - optional=True, - message="InterconnectGroupConfigured", - ) - + UNDEFINED_ISSUE_TYPE = 0 + IT_OUTAGE = 175779973 + IT_PARTIAL_OUTAGE = 92103971 + OUTAGE = 195285745 + PARTIAL_OUTAGE = 147053455 -class InterconnectGroupsOperationalStatusInterconnectStatus(proto.Message): - r"""The status of one Interconnect in the group. The order is - arbitrary. + class Source(proto.Enum): + r"""The party that generated this notification, which can take the + following value: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - GOOGLE: this notification as generated by Google. - Attributes: - admin_enabled (bool): - Whether the Interconnect is enabled. + Note that the value of NSRC_GOOGLE has been deprecated in favor of + GOOGLE. - This field is a member of `oneof`_ ``_admin_enabled``. - diagnostics (google.cloud.compute_v1beta.types.InterconnectDiagnostics): - The diagnostics of the Interconnect, as - returned by the existing get-diagnostics method. + Values: + UNDEFINED_SOURCE (0): + A value indicating that the enum field is not + set. + GOOGLE (497439289): + This notification was generated by Google. + NSRC_GOOGLE (510574562): + [Deprecated] This notification was generated by Google. + """ + UNDEFINED_SOURCE = 0 + GOOGLE = 497439289 + NSRC_GOOGLE = 510574562 - This field is a member of `oneof`_ ``_diagnostics``. - interconnect (str): - The URL of the Interconnect being described. + class State(proto.Enum): + r"""State of this notification, which can take one of the following + values: - This field is a member of `oneof`_ ``_interconnect``. - is_active (str): - Whether this interconnect is participating in - the redundant configuration. Check the IsActive - enum for the list of possible values. + :: - This field is a member of `oneof`_ ``_is_active``. - """ + - ACTIVE: This outage notification is active. The event could be in + the past, present, or future. See start_time and end_time for + scheduling. + - CANCELLED: The outage associated with this notification was cancelled + before the outage was due to start. + - COMPLETED: The outage associated with this notification is complete. - class IsActive(proto.Enum): - r"""Whether this interconnect is participating in the redundant - configuration. + Note that the versions of this enum prefixed with "NS\_" have been + deprecated in favor of the unprefixed values. Values: - UNDEFINED_IS_ACTIVE (0): + UNDEFINED_STATE (0): A value indicating that the enum field is not set. ACTIVE (314733318): - No description available. - INACTIVE (270421099): - No description available. - IS_ACTIVE_UNSPECIFIED (274948243): - No description available. + This outage notification is active. The event could be in + the future, present, or past. See start_time and end_time + for scheduling. + CANCELLED (41957681): + The outage associated with this notification + was cancelled before the outage was due to + start. + COMPLETED (309921323): + The outage associated with this notification + is complete. + NS_ACTIVE (252563136): + [Deprecated] This outage notification is active. The event + could be in the future, present, or past. See start_time and + end_time for scheduling. + NS_CANCELED (506579411): + [Deprecated] The outage associated with this notification + was canceled before the outage was due to start. """ - UNDEFINED_IS_ACTIVE = 0 + UNDEFINED_STATE = 0 ACTIVE = 314733318 - INACTIVE = 270421099 - IS_ACTIVE_UNSPECIFIED = 274948243 + CANCELLED = 41957681 + COMPLETED = 309921323 + NS_ACTIVE = 252563136 + NS_CANCELED = 506579411 - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, - optional=True, + affected_circuits: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=177717013, ) - diagnostics: "InterconnectDiagnostics" = proto.Field( - proto.MESSAGE, - number=333355436, + description: str = proto.Field( + proto.STRING, + number=422937596, optional=True, - message="InterconnectDiagnostics", ) - interconnect: str = proto.Field( - proto.STRING, - number=224601230, + end_time: int = proto.Field( + proto.INT64, + number=114938801, optional=True, ) - is_active: str = proto.Field( + issue_type: str = proto.Field( proto.STRING, - number=114830267, + number=369639136, optional=True, ) - - -class InterconnectList(proto.Message): - r"""Response to the list request, and contains a list of - interconnects. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Interconnect]): - A list of Interconnect resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectList for lists of interconnects. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - - This field is a member of `oneof`_ ``_warning``. - """ - - @property - def raw_page(self): - return self - - id: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=3355, + number=3373707, optional=True, ) - items: MutableSequence["Interconnect"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Interconnect", - ) - kind: str = proto.Field( + source: str = proto.Field( proto.STRING, - number=3292052, + number=177235995, optional=True, ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, + start_time: int = proto.Field( + proto.INT64, + number=37467274, optional=True, ) - self_link: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=456214797, + number=109757585, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + + +class InterconnectParams(proto.Message): + r"""Additional interconnect parameters. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, ) -class InterconnectLocation(proto.Message): - r"""Represents an Interconnect Attachment (VLAN) Location - resource. You can use this resource to find location details - about an Interconnect attachment (VLAN). For more information - about interconnect attachments, read Creating VLAN Attachments. +class InterconnectRemoteLocation(proto.Message): + r"""Represents a Cross-Cloud Interconnect Remote Location + resource. + You can use this resource to find remote location details about + an Interconnect attachment (VLAN). .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -62985,49 +71735,43 @@ class InterconnectLocation(proto.Message): character. This field is a member of `oneof`_ ``_address``. - availability_zone (str): - [Output Only] Availability zone for this - InterconnectLocation. Within a metropolitan area (metro), - maintenance will not be simultaneously scheduled in more - than one availability zone. Example: "zone1" or "zone2". + attachment_configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): + [Output Only] Subset of fields from InterconnectAttachment's + \|configurationConstraints\| field that apply to all + attachments for this remote location. - This field is a member of `oneof`_ ``_availability_zone``. - available_features (MutableSequence[str]): - [Output only] List of features available at this - InterconnectLocation, which can take one of the following - values: - IF_MACSEC Check the AvailableFeatures enum for the - list of possible values. - available_link_types (MutableSequence[str]): - [Output only] List of link types available at this - InterconnectLocation, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR - - LINK_TYPE_ETHERNET_100G_LR - LINK_TYPE_ETHERNET_400G_LR4 - Check the AvailableLinkTypes enum for the list of possible - values. + This field is a member of `oneof`_ ``_attachment_configuration_constraints``. city (str): [Output Only] Metropolitan area designator that indicates which city an interconnect is located. For example: "Chicago, IL", "Amsterdam, Netherlands". This field is a member of `oneof`_ ``_city``. + constraints (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraints): + [Output Only] Constraints on the parameters for creating + Cross-Cloud Interconnect and associated + InterconnectAttachments. + + This field is a member of `oneof`_ ``_constraints``. continent (str): [Output Only] Continent for this location, which can take - one of the following values: - AFRICA - ASIA_PAC - EUROPE - - NORTH_AMERICA - SOUTH_AMERICA Check the Continent enum for - the list of possible values. + one of the following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA + + Check the Continent enum for the list of possible values. This field is a member of `oneof`_ ``_continent``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. - cross_site_interconnect_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationCrossSiteInterconnectInfo]): - [Output Only] A list of - InterconnectLocation.CrossSiteInterconnectInfo objects, that - describe where Cross-Site Interconnect wires may connect to - from this location and associated connection parameters. - Cross-Site Interconnect isn't allowed to locations which are - not listed. description (str): [Output Only] An optional description of the resource. @@ -63048,10 +71792,38 @@ class InterconnectLocation(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#interconnectLocation for interconnect locations. + [Output Only] Type of the resource. + Alwayscompute#interconnectRemoteLocation for interconnect + remote locations. This field is a member of `oneof`_ ``_kind``. + lacp (str): + [Output Only] Link Aggregation Control Protocol (LACP) + constraints, which can take one of the following values: + LACP_SUPPORTED, LACP_UNSUPPORTED Check the Lacp enum for the + list of possible values. + + This field is a member of `oneof`_ ``_lacp``. + max_lag_size100_gbps (int): + [Output Only] The maximum number of 100 Gbps ports supported + in a link aggregation group (LAG). When linkType is 100 + Gbps, requestedLinkCount cannot exceed + max_lag_size_100_gbps. + + This field is a member of `oneof`_ ``_max_lag_size100_gbps``. + max_lag_size10_gbps (int): + [Output Only] The maximum number of 10 Gbps ports supported + in a link aggregation group (LAG). When linkType is 10 Gbps, + requestedLinkCount cannot exceed max_lag_size_10_gbps. + + This field is a member of `oneof`_ ``_max_lag_size10_gbps``. + max_lag_size400_gbps (int): + [Output Only] The maximum number of 400 Gbps ports supported + in a link aggregation group (LAG). When linkType is 400 + Gbps, requestedLinkCount cannot exceed + max_lag_size_400_gbps. + + This field is a member of `oneof`_ ``_max_lag_size400_gbps``. name (str): [Output Only] Name of the resource. @@ -63061,75 +71833,46 @@ class InterconnectLocation(proto.Message): (corresponding with a netfac type in peeringdb). This field is a member of `oneof`_ ``_peeringdb_facility_id``. - region_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationRegionInfo]): - [Output Only] A list of InterconnectLocation.RegionInfo - objects, that describe parameters pertaining to the relation - between this InterconnectLocation and various Google Cloud - regions. + permitted_connections (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocationPermittedConnections]): + [Output Only] Permitted connections. + remote_service (str): + [Output Only] Indicates the service provider present at the + remote location. Example values: "Amazon Web Services", + "Microsoft Azure". + + This field is a member of `oneof`_ ``_remote_service``. self_link (str): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - single_region_production_critical_peer_locations (MutableSequence[str]): - [Output Only] URLs of the other locations that can pair up - with this location to support Single-Region 99.99% SLA. E.g. - iad-zone1-1 and iad-zone2-5467 are Single-Region 99.99% peer - locations of each other. status (str): - [Output Only] The status of this InterconnectLocation, which - can take one of the following values: - CLOSED: The - InterconnectLocation is closed and is unavailable for - provisioning new Interconnects. - AVAILABLE: The - InterconnectLocation is available for provisioning new - Interconnects. Check the Status enum for the list of - possible values. - - This field is a member of `oneof`_ ``_status``. - supports_pzs (bool): - [Output Only] Reserved for future use. - - This field is a member of `oneof`_ ``_supports_pzs``. - """ + [Output Only] The status of this InterconnectRemoteLocation, + which can take one of the following values: - class AvailableFeatures(proto.Enum): - r""" + :: - Values: - UNDEFINED_AVAILABLE_FEATURES (0): - A value indicating that the enum field is not - set. - IF_CROSS_SITE_NETWORK (469111095): - Cross-Site Networking - IF_MACSEC (396279300): - Media Access Control security (MACsec) - """ - UNDEFINED_AVAILABLE_FEATURES = 0 - IF_CROSS_SITE_NETWORK = 469111095 - IF_MACSEC = 396279300 + - CLOSED: The InterconnectRemoteLocation is closed and is unavailable + for provisioning new Cross-Cloud Interconnects. + - AVAILABLE: The + InterconnectRemoteLocation is available for provisioning new + Cross-Cloud Interconnects. - class AvailableLinkTypes(proto.Enum): - r""" + Check the Status enum for the list of possible values. - Values: - UNDEFINED_AVAILABLE_LINK_TYPES (0): - A value indicating that the enum field is not - set. - LINK_TYPE_ETHERNET_100G_LR (337672551): - 100G Ethernet, LR Optics. - LINK_TYPE_ETHERNET_10G_LR (236739749): - 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; - LINK_TYPE_ETHERNET_400G_LR4 (127023690): - 400G Ethernet, LR4 Optics. - """ - UNDEFINED_AVAILABLE_LINK_TYPES = 0 - LINK_TYPE_ETHERNET_100G_LR = 337672551 - LINK_TYPE_ETHERNET_10G_LR = 236739749 - LINK_TYPE_ETHERNET_400G_LR4 = 127023690 + This field is a member of `oneof`_ ``_status``. + """ class Continent(proto.Enum): r"""[Output Only] Continent for this location, which can take one of the - following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - - SOUTH_AMERICA + following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA Values: UNDEFINED_CONTINENT (0): @@ -63139,16 +71882,6 @@ class Continent(proto.Enum): No description available. ASIA_PAC (119782269): No description available. - C_AFRICA (71993846): - No description available. - C_ASIA_PAC (465668089): - No description available. - C_EUROPE (200369438): - No description available. - C_NORTH_AMERICA (275697048): - No description available. - C_SOUTH_AMERICA (397149792): - No description available. EUROPE (445819298): No description available. NORTH_AMERICA (448015508): @@ -63159,32 +71892,54 @@ class Continent(proto.Enum): UNDEFINED_CONTINENT = 0 AFRICA = 317443706 ASIA_PAC = 119782269 - C_AFRICA = 71993846 - C_ASIA_PAC = 465668089 - C_EUROPE = 200369438 - C_NORTH_AMERICA = 275697048 - C_SOUTH_AMERICA = 397149792 EUROPE = 445819298 NORTH_AMERICA = 448015508 SOUTH_AMERICA = 32597340 + class Lacp(proto.Enum): + r"""[Output Only] Link Aggregation Control Protocol (LACP) constraints, + which can take one of the following values: LACP_SUPPORTED, + LACP_UNSUPPORTED + + Values: + UNDEFINED_LACP (0): + A value indicating that the enum field is not + set. + LACP_SUPPORTED (339576113): + LACP_SUPPORTED: LACP is supported, and enabled by default on + the Cross-Cloud Interconnect. + LACP_UNSUPPORTED (203930104): + LACP_UNSUPPORTED: LACP is not supported and is not be + enabled on this port. GetDiagnostics shows + bundleAggregationType as "static". GCP does not support LAGs + without LACP, so requestedLinkCount must be 1. + """ + UNDEFINED_LACP = 0 + LACP_SUPPORTED = 339576113 + LACP_UNSUPPORTED = 203930104 + class Status(proto.Enum): - r"""[Output Only] The status of this InterconnectLocation, which can - take one of the following values: - CLOSED: The InterconnectLocation - is closed and is unavailable for provisioning new Interconnects. - - AVAILABLE: The InterconnectLocation is available for provisioning - new Interconnects. + r"""[Output Only] The status of this InterconnectRemoteLocation, which + can take one of the following values: + + :: + + - CLOSED: The InterconnectRemoteLocation is closed and is unavailable + for provisioning new Cross-Cloud Interconnects. + - AVAILABLE: The + InterconnectRemoteLocation is available for provisioning new + Cross-Cloud Interconnects. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. AVAILABLE (442079913): - The InterconnectLocation is available for - provisioning new Interconnects. + The InterconnectRemoteLocation is available + for provisioning new Cross-Cloud Interconnects. CLOSED (380163436): - The InterconnectLocation is closed for - provisioning new Interconnects. + The InterconnectRemoteLocation is closed for + provisioning new Cross-Cloud Interconnects. """ UNDEFINED_STATUS = 0 AVAILABLE = 442079913 @@ -63195,24 +71950,23 @@ class Status(proto.Enum): number=462920692, optional=True, ) - availability_zone: str = proto.Field( - proto.STRING, - number=158459920, + attachment_configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = proto.Field( + proto.MESSAGE, + number=326825041, optional=True, - ) - available_features: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=496344307, - ) - available_link_types: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=509504298, + message="InterconnectAttachmentConfigurationConstraints", ) city: str = proto.Field( proto.STRING, number=3053931, optional=True, ) + constraints: "InterconnectRemoteLocationConstraints" = proto.Field( + proto.MESSAGE, + number=3909174, + optional=True, + message="InterconnectRemoteLocationConstraints", + ) continent: str = proto.Field( proto.STRING, number=133442996, @@ -63223,13 +71977,6 @@ class Status(proto.Enum): number=30525366, optional=True, ) - cross_site_interconnect_infos: MutableSequence[ - "InterconnectLocationCrossSiteInterconnectInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=248573837, - message="InterconnectLocationCrossSiteInterconnectInfo", - ) description: str = proto.Field( proto.STRING, number=422937596, @@ -63255,6 +72002,26 @@ class Status(proto.Enum): number=3292052, optional=True, ) + lacp: str = proto.Field( + proto.STRING, + number=3313826, + optional=True, + ) + max_lag_size100_gbps: int = proto.Field( + proto.INT32, + number=245219253, + optional=True, + ) + max_lag_size10_gbps: int = proto.Field( + proto.INT32, + number=294007573, + optional=True, + ) + max_lag_size400_gbps: int = proto.Field( + proto.INT32, + number=104941138, + optional=True, + ) name: str = proto.Field( proto.STRING, number=3373707, @@ -63265,65 +72032,184 @@ class Status(proto.Enum): number=536567094, optional=True, ) - region_infos: MutableSequence[ - "InterconnectLocationRegionInfo" + permitted_connections: MutableSequence[ + "InterconnectRemoteLocationPermittedConnections" ] = proto.RepeatedField( proto.MESSAGE, - number=312194170, - message="InterconnectLocationRegionInfo", + number=442063278, + message="InterconnectRemoteLocationPermittedConnections", ) - self_link: str = proto.Field( + remote_service: str = proto.Field( proto.STRING, - number=456214797, + number=391954364, optional=True, ) - single_region_production_critical_peer_locations: MutableSequence[ - str - ] = proto.RepeatedField( + self_link: str = proto.Field( proto.STRING, - number=439537103, + number=456214797, + optional=True, ) status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - supports_pzs: bool = proto.Field( - proto.BOOL, - number=83983214, + + +class InterconnectRemoteLocationConstraints(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + port_pair_remote_location (str): + [Output Only] Port pair remote location constraints, which + can take one of the following values: + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + PORT_PAIR_MATCHING_REMOTE_LOCATION. + + Google Cloud API refers only to individual ports, but the UI + uses this field when ordering a pair of ports, to prevent + users from accidentally ordering something that is + incompatible with their cloud provider. Specifically, when + ordering a redundant pair of Cross-Cloud Interconnect ports, + and one of them uses a remote location with + portPairMatchingRemoteLocation set to matching, the UI + requires that both ports use the same remote location. Check + the PortPairRemoteLocation enum for the list of possible + values. + + This field is a member of `oneof`_ ``_port_pair_remote_location``. + port_pair_vlan (str): + [Output Only] Port pair VLAN constraints, which can take one + of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, + PORT_PAIR_MATCHING_VLAN Check the PortPairVlan enum for the + list of possible values. + + This field is a member of `oneof`_ ``_port_pair_vlan``. + subnet_length_range (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraintsSubnetLengthRange): + [Output Only] + + [min-length, max-length] + + The minimum and maximum value (inclusive) for the IPv4 + subnet length. + + For example, an interconnectRemoteLocation for Azure has + {min: 30, max: 30} because Azure requires /30 subnets. + + This range specifies the values supported by both cloud + providers. Interconnect currently supports /29 and /30 IPv4 + subnet lengths. If a remote cloud has no constraint on IPv4 + subnet length, the range would thus be {min: 29, max: 30}. + + This field is a member of `oneof`_ ``_subnet_length_range``. + """ + + class PortPairRemoteLocation(proto.Enum): + r"""[Output Only] Port pair remote location constraints, which can take + one of the following values: + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + PORT_PAIR_MATCHING_REMOTE_LOCATION. + + Google Cloud API refers only to individual ports, but the UI uses + this field when ordering a pair of ports, to prevent users from + accidentally ordering something that is incompatible with their + cloud provider. Specifically, when ordering a redundant pair of + Cross-Cloud Interconnect ports, and one of them uses a remote + location with portPairMatchingRemoteLocation set to matching, the UI + requires that both ports use the same remote location. + + Values: + UNDEFINED_PORT_PAIR_REMOTE_LOCATION (0): + A value indicating that the enum field is not + set. + PORT_PAIR_MATCHING_REMOTE_LOCATION (207291859): + If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud + provider allocates ports in pairs, and the user should + choose the same remote location for both ports. + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION (60609829): + If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt + to provision a redundant pair of Cross-Cloud Interconnects + using two different remote locations in the same city. + """ + UNDEFINED_PORT_PAIR_REMOTE_LOCATION = 0 + PORT_PAIR_MATCHING_REMOTE_LOCATION = 207291859 + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION = 60609829 + + class PortPairVlan(proto.Enum): + r"""[Output Only] Port pair VLAN constraints, which can take one of the + following values: PORT_PAIR_UNCONSTRAINED_VLAN, + PORT_PAIR_MATCHING_VLAN + + Values: + UNDEFINED_PORT_PAIR_VLAN (0): + A value indicating that the enum field is not + set. + PORT_PAIR_MATCHING_VLAN (250295358): + If PORT_PAIR_MATCHING_VLAN, the Interconnect for this + attachment is part of a pair of ports that should have + matching VLAN allocations. This occurs with Cross-Cloud + Interconnect to Azure remote locations. While GCP's API does + not explicitly group pairs of ports, the UI uses this field + to ensure matching VLAN ids when configuring a redundant + VLAN pair. + PORT_PAIR_UNCONSTRAINED_VLAN (175227948): + PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint. + """ + UNDEFINED_PORT_PAIR_VLAN = 0 + PORT_PAIR_MATCHING_VLAN = 250295358 + PORT_PAIR_UNCONSTRAINED_VLAN = 175227948 + + port_pair_remote_location: str = proto.Field( + proto.STRING, + number=495917351, optional=True, ) + port_pair_vlan: str = proto.Field( + proto.STRING, + number=478214506, + optional=True, + ) + subnet_length_range: "InterconnectRemoteLocationConstraintsSubnetLengthRange" = ( + proto.Field( + proto.MESSAGE, + number=184473670, + optional=True, + message="InterconnectRemoteLocationConstraintsSubnetLengthRange", + ) + ) -class InterconnectLocationCrossSiteInterconnectInfo(proto.Message): - r"""Information about Cross-Site Interconnect wires which may be - created between the containing location and another remote - location. - +class InterconnectRemoteLocationConstraintsSubnetLengthRange(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - city (str): - The remote location for Cross-Site - Interconnect wires. This specifies an - InterconnectLocation city (metropolitan area - designator), which itself may match multiple - InterconnectLocations. + max_ (int): - This field is a member of `oneof`_ ``_city``. + This field is a member of `oneof`_ ``_max``. + min_ (int): + + This field is a member of `oneof`_ ``_min``. """ - city: str = proto.Field( - proto.STRING, - number=3053931, + max_: int = proto.Field( + proto.INT32, + number=107876, + optional=True, + ) + min_: int = proto.Field( + proto.INT32, + number=108114, optional=True, ) -class InterconnectLocationList(proto.Message): +class InterconnectRemoteLocationList(proto.Message): r"""Response to the list request, and contains a list of - interconnect locations. + interconnect remote locations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -63334,18 +72220,19 @@ class InterconnectLocationList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocation]): - A list of InterconnectLocation resources. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocation]): + A list of InterconnectRemoteLocation + resources. kind (str): - [Output Only] Type of resource. Always - compute#interconnectLocationList for lists of interconnect - locations. + [Output Only] Type of resource. + Alwayscompute#interconnectRemoteLocationList for lists of + interconnect remote locations. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of + [Output Only] This token lets you get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -63370,10 +72257,10 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["InterconnectLocation"] = proto.RepeatedField( + items: MutableSequence["InterconnectRemoteLocation"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InterconnectLocation", + message="InterconnectRemoteLocation", ) kind: str = proto.Field( proto.STRING, @@ -63398,416 +72285,388 @@ def raw_page(self): ) -class InterconnectLocationRegionInfo(proto.Message): - r"""Information about any potential InterconnectAttachments - between an Interconnect at a specific InterconnectLocation, and - a specific Cloud Region. - +class InterconnectRemoteLocationPermittedConnections(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - expected_rtt_ms (int): - Expected round-trip time in milliseconds, - from this InterconnectLocation to a VM in this - region. - - This field is a member of `oneof`_ ``_expected_rtt_ms``. - location_presence (str): - Identifies the network presence of this - location. Check the LocationPresence enum for - the list of possible values. - - This field is a member of `oneof`_ ``_location_presence``. - region (str): - URL for the region of this location. + interconnect_location (str): + [Output Only] URL of an Interconnect location that is + permitted to connect to this Interconnect remote location. - This field is a member of `oneof`_ ``_region``. + This field is a member of `oneof`_ ``_interconnect_location``. """ - class LocationPresence(proto.Enum): - r"""Identifies the network presence of this location. - - Values: - UNDEFINED_LOCATION_PRESENCE (0): - A value indicating that the enum field is not - set. - GLOBAL (494663587): - This region is not in any common network - presence with this InterconnectLocation. - LOCAL_REGION (403535464): - This region shares the same regional network - presence as this InterconnectLocation. - LP_GLOBAL (429584062): - [Deprecated] This region is not in any common network - presence with this InterconnectLocation. - LP_LOCAL_REGION (488598851): - [Deprecated] This region shares the same regional network - presence as this InterconnectLocation. - """ - UNDEFINED_LOCATION_PRESENCE = 0 - GLOBAL = 494663587 - LOCAL_REGION = 403535464 - LP_GLOBAL = 429584062 - LP_LOCAL_REGION = 488598851 - - expected_rtt_ms: int = proto.Field( - proto.INT64, - number=422543866, - optional=True, - ) - location_presence: str = proto.Field( + interconnect_location: str = proto.Field( proto.STRING, - number=101517893, + number=492235846, optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + + +class InterconnectsGetDiagnosticsResponse(proto.Message): + r"""Response for the InterconnectsGetDiagnosticsRequest. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + result (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + + This field is a member of `oneof`_ ``_result``. + """ + + result: "InterconnectDiagnostics" = proto.Field( + proto.MESSAGE, + number=139315229, optional=True, + message="InterconnectDiagnostics", ) -class InterconnectMacsec(proto.Message): - r"""Configuration information for enabling Media Access Control - security (MACsec) on this Cloud Interconnect connection between - Google and your on-premises router. - +class InterconnectsGetMacsecConfigResponse(proto.Message): + r"""Response for the InterconnectsGetMacsecConfigRequest. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fail_open (bool): - If set to true, the Interconnect connection - is configured with a should-secure MACsec - security policy, that allows the Google router - to fallback to cleartext traffic if the MKA - session cannot be established. By default, the - Interconnect connection is configured with a - must-secure security policy that drops all - traffic if the MKA session cannot be established - with your router. + etag (str): + end_interface: MixerGetResponseWithEtagBuilder - This field is a member of `oneof`_ ``_fail_open``. - pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecPreSharedKey]): - Required. A keychain placeholder describing a - set of named key objects along with their start - times. A MACsec CKN/CAK is generated for each - key in the key chain. Google router - automatically picks the key with the most recent - startTime when establishing or re-establishing a - MACsec secure link. + This field is a member of `oneof`_ ``_etag``. + result (google.cloud.compute_v1beta.types.InterconnectMacsecConfig): + + This field is a member of `oneof`_ ``_result``. """ - fail_open: bool = proto.Field( - proto.BOOL, - number=532597451, + etag: str = proto.Field( + proto.STRING, + number=3123477, optional=True, ) - pre_shared_keys: MutableSequence[ - "InterconnectMacsecPreSharedKey" - ] = proto.RepeatedField( + result: "InterconnectMacsecConfig" = proto.Field( proto.MESSAGE, - number=420308466, - message="InterconnectMacsecPreSharedKey", + number=139315229, + optional=True, + message="InterconnectMacsecConfig", ) -class InterconnectMacsecConfig(proto.Message): - r"""MACsec configuration information for the Interconnect - connection. Contains the generated Connectivity Association Key - Name (CKN) and the key (CAK) for this Interconnect connection. +class InvalidateCacheRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.InvalidateCache. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecConfigPreSharedKey]): - A keychain placeholder describing a set of - named key objects along with their start times. - A MACsec CKN/CAK is generated for each key in - the key chain. Google router automatically picks - the key with the most recent startTime when - establishing or re-establishing a MACsec secure - link. + cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + begin_interface: MixerMutationRequestBuilder Request ID to + support idempotency. + + This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap scoping this request. """ - pre_shared_keys: MutableSequence[ - "InterconnectMacsecConfigPreSharedKey" - ] = proto.RepeatedField( + cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( proto.MESSAGE, - number=420308466, - message="InterconnectMacsecConfigPreSharedKey", + number=312795565, + message="CacheInvalidationRule", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + url_map: str = proto.Field( + proto.STRING, + number=367020684, ) -class InterconnectMacsecConfigPreSharedKey(proto.Message): - r"""Describes a pre-shared key used to setup MACsec in static - connectivity association key (CAK) mode. +class InvalidateCacheUrlMapRequest(proto.Message): + r"""A request message for UrlMaps.InvalidateCache. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cak (str): - An auto-generated Connectivity Association - Key (CAK) for this key. - - This field is a member of `oneof`_ ``_cak``. - ckn (str): - An auto-generated Connectivity Association - Key Name (CKN) for this key. - - This field is a member of `oneof`_ ``_ckn``. - name (str): - User provided name for this pre-shared key. - - This field is a member of `oneof`_ ``_name``. - start_time (str): - User provided timestamp on or after which - this key is valid. + cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap scoping this request. """ - cak: str = proto.Field( - proto.STRING, - number=98253, - optional=True, + cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( + proto.MESSAGE, + number=312795565, + message="CacheInvalidationRule", ) - ckn: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=98566, - optional=True, + number=227560217, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, + number=37109963, optional=True, ) - start_time: str = proto.Field( + url_map: str = proto.Field( proto.STRING, - number=37467274, - optional=True, + number=367020684, ) -class InterconnectMacsecPreSharedKey(proto.Message): - r"""Describes a pre-shared key used to setup MACsec in static - connectivity association key (CAK) mode. - +class Items(proto.Message): + r"""Metadata .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Required. A name for this pre-shared key. The name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. + key (str): + Key for the metadata entry. Keys must conform to the + following regexp: [a-zA-Z0-9-\_]+, and be less than 128 + bytes in length. This is reflected as part of a URL in the + metadata server. Additionally, to avoid ambiguity, keys must + not conflict with any other metadata keys for the project. - This field is a member of `oneof`_ ``_name``. - start_time (str): - A RFC3339 timestamp on or after which the key - is valid. startTime can be in the future. If the - keychain has a single key, startTime can be - omitted. If the keychain has multiple keys, - startTime is mandatory for each key. The start - times of keys must be in increasing order. The - start times of two consecutive keys must be at - least 6 hours apart. + This field is a member of `oneof`_ ``_key``. + value (str): + Value for the metadata entry. These are + free-form strings, and only have meaning as + interpreted by the image running in the + instance. The only restriction placed on values + is that their size must be less than or equal to + 262144 bytes (256 KiB). - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_value``. """ - name: str = proto.Field( + key: str = proto.Field( proto.STRING, - number=3373707, + number=106079, optional=True, ) - start_time: str = proto.Field( + value: str = proto.Field( proto.STRING, - number=37467274, + number=111972721, optional=True, ) -class InterconnectOutageNotification(proto.Message): - r"""Description of a planned outage on this Interconnect. +class License(proto.Message): + r"""Represents a License resource. + + A License represents billing and aggregate usage data forpublic + andmarketplace images. *Caution* This resource is intended for use + only by third-party partners who are creatingCloud Marketplace + images. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - affected_circuits (MutableSequence[str]): - If issue_type is IT_PARTIAL_OUTAGE, a list of the - Google-side circuit IDs that will be affected. + allowed_replacement_licenses (MutableSequence[str]): + Specifies licenseCodes of licenses that can replace this + license. Note: such replacements are allowed even if + removable_from_disk is false. + appendable_to_disk (bool): + If true, this license can be appended to an + existing disk's set of licenses. + + This field is a member of `oneof`_ ``_appendable_to_disk``. + charges_use_fee (bool): + [Output Only] Deprecated. This field no longer reflects + whether a license charges a usage fee. + + This field is a member of `oneof`_ ``_charges_use_fee``. + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - A description about the purpose of the - outage. + An optional textual description of the + resource; provided by the client when the + resource is created. This field is a member of `oneof`_ ``_description``. - end_time (int): - Scheduled end time for the outage - (milliseconds since Unix epoch). + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - This field is a member of `oneof`_ ``_end_time``. - issue_type (str): - Form this outage is expected to take, which can take one of - the following values: - OUTAGE: The Interconnect may be - completely out of service for some or all of the specified - window. - PARTIAL_OUTAGE: Some circuits comprising the - Interconnect as a whole should remain up, but with reduced - bandwidth. Note that the versions of this enum prefixed with - "IT\_" have been deprecated in favor of the unprefixed - values. Check the IssueType enum for the list of possible - values. + This field is a member of `oneof`_ ``_id``. + incompatible_licenses (MutableSequence[str]): + Specifies licenseCodes of licenses that are + incompatible with this license. If a license is + incompatible with this license, it cannot be + attached to the same disk or image. + kind (str): + [Output Only] Type of resource. Always compute#license for + licenses. - This field is a member of `oneof`_ ``_issue_type``. + This field is a member of `oneof`_ ``_kind``. + license_code (int): + [Output Only] The unique code used to attach this license to + images, snapshots, and disks. + + This field is a member of `oneof`_ ``_license_code``. + minimum_retention (google.cloud.compute_v1beta.types.Duration): + If set, this license will be unable to be removed or + replaced once attached to a disk until the minimum_retention + period has passed. + + This field is a member of `oneof`_ ``_minimum_retention``. + multi_tenant_only (bool): + If true, this license can only be used on VMs + on multi tenant nodes. + + This field is a member of `oneof`_ ``_multi_tenant_only``. name (str): - Unique identifier for this outage - notification. + Name of the resource. The name must be 1-63 + characters long and comply withRFC1035. This field is a member of `oneof`_ ``_name``. - source (str): - The party that generated this notification, which can take - the following value: - GOOGLE: this notification as - generated by Google. Note that the value of NSRC_GOOGLE has - been deprecated in favor of GOOGLE. Check the Source enum - for the list of possible values. - - This field is a member of `oneof`_ ``_source``. - start_time (int): - Scheduled start time for the outage - (milliseconds since Unix epoch). + os_license (bool): + If true, indicates this is an OS license. + Only one OS license can be attached to a disk or + image at a time. - This field is a member of `oneof`_ ``_start_time``. - state (str): - State of this notification, which can take one of the - following values: - ACTIVE: This outage notification is - active. The event could be in the past, present, or future. - See start_time and end_time for scheduling. - CANCELLED: The - outage associated with this notification was cancelled - before the outage was due to start. - COMPLETED: The outage - associated with this notification is complete. Note that the - versions of this enum prefixed with "NS\_" have been - deprecated in favor of the unprefixed values. Check the - State enum for the list of possible values. + This field is a member of `oneof`_ ``_os_license``. + removable_from_disk (bool): + If true, this license can be removed from a + disk's set of licenses, with no replacement + license needed. - This field is a member of `oneof`_ ``_state``. - """ + This field is a member of `oneof`_ ``_removable_from_disk``. + required_coattached_licenses (MutableSequence[str]): + Specifies the set of permissible coattached + licenseCodes of licenses that satisfy the + coattachment requirement of this license. At + least one license from the set must be attached + to the same disk or image as this license. + resource_requirements (google.cloud.compute_v1beta.types.LicenseResourceRequirements): + [Input Only] Deprecated. - class IssueType(proto.Enum): - r"""Form this outage is expected to take, which can take one of the - following values: - OUTAGE: The Interconnect may be completely out - of service for some or all of the specified window. - - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole - should remain up, but with reduced bandwidth. Note that the versions - of this enum prefixed with "IT\_" have been deprecated in favor of - the unprefixed values. + This field is a member of `oneof`_ ``_resource_requirements``. + self_link (str): + [Output Only] Server-defined URL for the resource. - Values: - UNDEFINED_ISSUE_TYPE (0): - A value indicating that the enum field is not - set. - IT_OUTAGE (175779973): - [Deprecated] The Interconnect may be completely out of - service for some or all of the specified window. - IT_PARTIAL_OUTAGE (92103971): - [Deprecated] Some circuits comprising the Interconnect will - be out of service during the expected window. The - interconnect as a whole should remain up, albeit with - reduced bandwidth. - OUTAGE (195285745): - The Interconnect may be completely out of - service for some or all of the specified window. - PARTIAL_OUTAGE (147053455): - Some circuits comprising the Interconnect - will be out of service during the expected - window. The interconnect as a whole should - remain up, albeit with reduced bandwidth. - """ - UNDEFINED_ISSUE_TYPE = 0 - IT_OUTAGE = 175779973 - IT_PARTIAL_OUTAGE = 92103971 - OUTAGE = 195285745 - PARTIAL_OUTAGE = 147053455 + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL for this resource with the + resource id. - class Source(proto.Enum): - r"""The party that generated this notification, which can take the - following value: - GOOGLE: this notification as generated by Google. - Note that the value of NSRC_GOOGLE has been deprecated in favor of - GOOGLE. + This field is a member of `oneof`_ ``_self_link_with_id``. + sole_tenant_only (bool): + If true, this license can only be used on VMs + on sole tenant nodes. - Values: - UNDEFINED_SOURCE (0): - A value indicating that the enum field is not - set. - GOOGLE (497439289): - This notification was generated by Google. - NSRC_GOOGLE (510574562): - [Deprecated] This notification was generated by Google. - """ - UNDEFINED_SOURCE = 0 - GOOGLE = 497439289 - NSRC_GOOGLE = 510574562 + This field is a member of `oneof`_ ``_sole_tenant_only``. + transferable (bool): + If false, licenses will not be copied from + the source resource when creating an image from + a disk, disk from snapshot, or snapshot from + disk. - class State(proto.Enum): - r"""State of this notification, which can take one of the following - values: - ACTIVE: This outage notification is active. The event - could be in the past, present, or future. See start_time and - end_time for scheduling. - CANCELLED: The outage associated with - this notification was cancelled before the outage was due to start. - - COMPLETED: The outage associated with this notification is - complete. Note that the versions of this enum prefixed with "NS\_" - have been deprecated in favor of the unprefixed values. + This field is a member of `oneof`_ ``_transferable``. + update_timestamp (str): + [Output Only] Last update timestamp inRFC3339 text format. - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - This outage notification is active. The event could be in - the future, present, or past. See start_time and end_time - for scheduling. - CANCELLED (41957681): - The outage associated with this notification - was cancelled before the outage was due to - start. - COMPLETED (309921323): - The outage associated with this notification - is complete. - NS_ACTIVE (252563136): - [Deprecated] This outage notification is active. The event - could be in the future, present, or past. See start_time and - end_time for scheduling. - NS_CANCELED (506579411): - [Deprecated] The outage associated with this notification - was canceled before the outage was due to start. - """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - CANCELLED = 41957681 - COMPLETED = 309921323 - NS_ACTIVE = 252563136 - NS_CANCELED = 506579411 + This field is a member of `oneof`_ ``_update_timestamp``. + """ - affected_circuits: MutableSequence[str] = proto.RepeatedField( + allowed_replacement_licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=177717013, + number=195677718, + ) + appendable_to_disk: bool = proto.Field( + proto.BOOL, + number=16959254, + optional=True, + ) + charges_use_fee: bool = proto.Field( + proto.BOOL, + number=372412622, + optional=True, + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - end_time: int = proto.Field( - proto.INT64, - number=114938801, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - issue_type: str = proto.Field( + incompatible_licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=369639136, + number=334239768, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + license_code: int = proto.Field( + proto.UINT64, + number=1467179, + optional=True, + ) + minimum_retention: "Duration" = proto.Field( + proto.MESSAGE, + number=155398189, + optional=True, + message="Duration", + ) + multi_tenant_only: bool = proto.Field( + proto.BOOL, + number=274395163, optional=True, ) name: str = proto.Field( @@ -63815,251 +72674,136 @@ class State(proto.Enum): number=3373707, optional=True, ) - source: str = proto.Field( + os_license: bool = proto.Field( + proto.BOOL, + number=487986406, + optional=True, + ) + removable_from_disk: bool = proto.Field( + proto.BOOL, + number=25854638, + optional=True, + ) + required_coattached_licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=177235995, + number=129195265, + ) + resource_requirements: "LicenseResourceRequirements" = proto.Field( + proto.MESSAGE, + number=214292769, optional=True, + message="LicenseResourceRequirements", ) - start_time: int = proto.Field( - proto.INT64, - number=37467274, + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, ) - state: str = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, - number=109757585, + number=44520962, + optional=True, + ) + sole_tenant_only: bool = proto.Field( + proto.BOOL, + number=427525559, + optional=True, + ) + transferable: bool = proto.Field( + proto.BOOL, + number=4349893, + optional=True, + ) + update_timestamp: str = proto.Field( + proto.STRING, + number=120894752, optional=True, ) -class InterconnectRemoteLocation(proto.Message): - r"""Represents a Cross-Cloud Interconnect Remote Location - resource. You can use this resource to find remote location - details about an Interconnect attachment (VLAN). +class LicenseCode(proto.Message): + r"""Represents a License Code resource. + + A License Code is a unique identifier used to represent alicense + resource. *Caution* This resource is intended for use only by + third-party partners who are creatingCloud Marketplace images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address (str): - [Output Only] The postal address of the Point of Presence, - each line in the address is separated by a newline - character. - - This field is a member of `oneof`_ ``_address``. - attachment_configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): - [Output Only] Subset of fields from InterconnectAttachment's - \|configurationConstraints\| field that apply to all - attachments for this remote location. - - This field is a member of `oneof`_ ``_attachment_configuration_constraints``. - city (str): - [Output Only] Metropolitan area designator that indicates - which city an interconnect is located. For example: - "Chicago, IL", "Amsterdam, Netherlands". - - This field is a member of `oneof`_ ``_city``. - constraints (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraints): - [Output Only] Constraints on the parameters for creating - Cross-Cloud Interconnect and associated - InterconnectAttachments. - - This field is a member of `oneof`_ ``_constraints``. - continent (str): - [Output Only] Continent for this location, which can take - one of the following values: - AFRICA - ASIA_PAC - EUROPE - - NORTH_AMERICA - SOUTH_AMERICA Check the Continent enum for - the list of possible values. - - This field is a member of `oneof`_ ``_continent``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - [Output Only] An optional description of the resource. + [Output Only] Description of this License Code. This field is a member of `oneof`_ ``_description``. - facility_provider (str): - [Output Only] The name of the provider for this facility - (e.g., EQUINIX). - - This field is a member of `oneof`_ ``_facility_provider``. - facility_provider_facility_id (str): - [Output Only] A provider-assigned Identifier for this - facility (e.g., Ashburn-DC1). - - This field is a member of `oneof`_ ``_facility_provider_facility_id``. id (int): [Output Only] The unique identifier for the resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#interconnectRemoteLocation for interconnect remote - locations. + [Output Only] Type of resource. Always compute#licenseCode + for licenses. This field is a member of `oneof`_ ``_kind``. - lacp (str): - [Output Only] Link Aggregation Control Protocol (LACP) - constraints, which can take one of the following values: - LACP_SUPPORTED, LACP_UNSUPPORTED Check the Lacp enum for the - list of possible values. - - This field is a member of `oneof`_ ``_lacp``. - max_lag_size100_gbps (int): - [Output Only] The maximum number of 100 Gbps ports supported - in a link aggregation group (LAG). When linkType is 100 - Gbps, requestedLinkCount cannot exceed - max_lag_size_100_gbps. - - This field is a member of `oneof`_ ``_max_lag_size100_gbps``. - max_lag_size10_gbps (int): - [Output Only] The maximum number of 10 Gbps ports supported - in a link aggregation group (LAG). When linkType is 10 Gbps, - requestedLinkCount cannot exceed max_lag_size_10_gbps. - - This field is a member of `oneof`_ ``_max_lag_size10_gbps``. - max_lag_size400_gbps (int): - [Output Only] The maximum number of 400 Gbps ports supported - in a link aggregation group (LAG). When linkType is 400 - Gbps, requestedLinkCount cannot exceed - max_lag_size_400_gbps. - - This field is a member of `oneof`_ ``_max_lag_size400_gbps``. + license_alias (MutableSequence[google.cloud.compute_v1beta.types.LicenseCodeLicenseAlias]): + [Output Only] URL and description aliases of Licenses with + the same License Code. name (str): - [Output Only] Name of the resource. + [Output Only] Name of the resource. The name is 1-20 + characters long and must be a valid 64 bit integer. This field is a member of `oneof`_ ``_name``. - peeringdb_facility_id (str): - [Output Only] The peeringdb identifier for this facility - (corresponding with a netfac type in peeringdb). - - This field is a member of `oneof`_ ``_peeringdb_facility_id``. - permitted_connections (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocationPermittedConnections]): - [Output Only] Permitted connections. - remote_service (str): - [Output Only] Indicates the service provider present at the - remote location. Example values: "Amazon Web Services", - "Microsoft Azure". - - This field is a member of `oneof`_ ``_remote_service``. self_link (str): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - status (str): - [Output Only] The status of this InterconnectRemoteLocation, - which can take one of the following values: - CLOSED: The - InterconnectRemoteLocation is closed and is unavailable for - provisioning new Cross-Cloud Interconnects. - AVAILABLE: The - InterconnectRemoteLocation is available for provisioning new - Cross-Cloud Interconnects. Check the Status enum for the - list of possible values. + state (str): + [Output Only] Current state of this License Code. Check the + State enum for the list of possible values. - This field is a member of `oneof`_ ``_status``. + This field is a member of `oneof`_ ``_state``. + transferable (bool): + [Output Only] If true, the license will remain attached when + creating images or snapshots from disks. Otherwise, the + license is not transferred. + + This field is a member of `oneof`_ ``_transferable``. """ - class Continent(proto.Enum): - r"""[Output Only] Continent for this location, which can take one of the - following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - - SOUTH_AMERICA + class State(proto.Enum): + r"""[Output Only] Current state of this License Code. Values: - UNDEFINED_CONTINENT (0): + UNDEFINED_STATE (0): A value indicating that the enum field is not set. - AFRICA (317443706): - No description available. - ASIA_PAC (119782269): - No description available. - EUROPE (445819298): - No description available. - NORTH_AMERICA (448015508): - No description available. - SOUTH_AMERICA (32597340): + DISABLED (516696700): + Machines are not allowed to attach boot disks + with this License Code. Requests to create new + resources with this license will be rejected. + ENABLED (182130465): + Use is allowed for anyone with USE_READ_ONLY access to this + License Code. + RESTRICTED (261551195): + Use of this license is limited to a project + whitelist. + STATE_UNSPECIFIED (470755401): No description available. - """ - UNDEFINED_CONTINENT = 0 - AFRICA = 317443706 - ASIA_PAC = 119782269 - EUROPE = 445819298 - NORTH_AMERICA = 448015508 - SOUTH_AMERICA = 32597340 - - class Lacp(proto.Enum): - r"""[Output Only] Link Aggregation Control Protocol (LACP) constraints, - which can take one of the following values: LACP_SUPPORTED, - LACP_UNSUPPORTED - - Values: - UNDEFINED_LACP (0): - A value indicating that the enum field is not - set. - LACP_SUPPORTED (339576113): - LACP_SUPPORTED: LACP is supported, and enabled by default on - the Cross-Cloud Interconnect. - LACP_UNSUPPORTED (203930104): - LACP_UNSUPPORTED: LACP is not supported and is not be - enabled on this port. GetDiagnostics shows - bundleAggregationType as "static". GCP does not support LAGs - without LACP, so requestedLinkCount must be 1. - """ - UNDEFINED_LACP = 0 - LACP_SUPPORTED = 339576113 - LACP_UNSUPPORTED = 203930104 - - class Status(proto.Enum): - r"""[Output Only] The status of this InterconnectRemoteLocation, which - can take one of the following values: - CLOSED: The - InterconnectRemoteLocation is closed and is unavailable for - provisioning new Cross-Cloud Interconnects. - AVAILABLE: The - InterconnectRemoteLocation is available for provisioning new - Cross-Cloud Interconnects. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - AVAILABLE (442079913): - The InterconnectRemoteLocation is available - for provisioning new Cross-Cloud Interconnects. - CLOSED (380163436): - The InterconnectRemoteLocation is closed for - provisioning new Cross-Cloud Interconnects. - """ - UNDEFINED_STATUS = 0 - AVAILABLE = 442079913 - CLOSED = 380163436 - - address: str = proto.Field( - proto.STRING, - number=462920692, - optional=True, - ) - attachment_configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = proto.Field( - proto.MESSAGE, - number=326825041, - optional=True, - message="InterconnectAttachmentConfigurationConstraints", - ) - city: str = proto.Field( - proto.STRING, - number=3053931, - optional=True, - ) - constraints: "InterconnectRemoteLocationConstraints" = proto.Field( - proto.MESSAGE, - number=3909174, - optional=True, - message="InterconnectRemoteLocationConstraints", - ) - continent: str = proto.Field( - proto.STRING, - number=133442996, - optional=True, - ) + TERMINATED (250018339): + Reserved state. + """ + UNDEFINED_STATE = 0 + DISABLED = 516696700 + ENABLED = 182130465 + RESTRICTED = 261551195 + STATE_UNSPECIFIED = 470755401 + TERMINATED = 250018339 + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, @@ -64070,16 +72814,6 @@ class Status(proto.Enum): number=422937596, optional=True, ) - facility_provider: str = proto.Field( - proto.STRING, - number=533303309, - optional=True, - ) - facility_provider_facility_id: str = proto.Field( - proto.STRING, - number=87269125, - optional=True, - ) id: int = proto.Field( proto.UINT64, number=3355, @@ -64090,206 +72824,131 @@ class Status(proto.Enum): number=3292052, optional=True, ) - lacp: str = proto.Field( - proto.STRING, - number=3313826, - optional=True, - ) - max_lag_size100_gbps: int = proto.Field( - proto.INT32, - number=245219253, - optional=True, - ) - max_lag_size10_gbps: int = proto.Field( - proto.INT32, - number=294007573, - optional=True, - ) - max_lag_size400_gbps: int = proto.Field( - proto.INT32, - number=104941138, - optional=True, + license_alias: MutableSequence["LicenseCodeLicenseAlias"] = proto.RepeatedField( + proto.MESSAGE, + number=43550930, + message="LicenseCodeLicenseAlias", ) name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - peeringdb_facility_id: str = proto.Field( - proto.STRING, - number=536567094, - optional=True, - ) - permitted_connections: MutableSequence[ - "InterconnectRemoteLocationPermittedConnections" - ] = proto.RepeatedField( - proto.MESSAGE, - number=442063278, - message="InterconnectRemoteLocationPermittedConnections", - ) - remote_service: str = proto.Field( - proto.STRING, - number=391954364, - optional=True, - ) self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=181260274, + number=109757585, + optional=True, + ) + transferable: bool = proto.Field( + proto.BOOL, + number=4349893, optional=True, ) -class InterconnectRemoteLocationConstraints(proto.Message): +class LicenseCodeLicenseAlias(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - port_pair_remote_location (str): - [Output Only] Port pair remote location constraints, which - can take one of the following values: - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers - only to individual ports, but the UI uses this field when - ordering a pair of ports, to prevent users from accidentally - ordering something that is incompatible with their cloud - provider. Specifically, when ordering a redundant pair of - Cross-Cloud Interconnect ports, and one of them uses a - remote location with portPairMatchingRemoteLocation set to - matching, the UI requires that both ports use the same - remote location. Check the PortPairRemoteLocation enum for - the list of possible values. - - This field is a member of `oneof`_ ``_port_pair_remote_location``. - port_pair_vlan (str): - [Output Only] Port pair VLAN constraints, which can take one - of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, - PORT_PAIR_MATCHING_VLAN Check the PortPairVlan enum for the - list of possible values. + description (str): + [Output Only] Description of this License Code. - This field is a member of `oneof`_ ``_port_pair_vlan``. - subnet_length_range (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraintsSubnetLengthRange): - [Output Only] [min-length, max-length] The minimum and - maximum value (inclusive) for the IPv4 subnet length. For - example, an interconnectRemoteLocation for Azure has {min: - 30, max: 30} because Azure requires /30 subnets. This range - specifies the values supported by both cloud providers. - Interconnect currently supports /29 and /30 IPv4 subnet - lengths. If a remote cloud has no constraint on IPv4 subnet - length, the range would thus be {min: 29, max: 30}. + This field is a member of `oneof`_ ``_description``. + self_link (str): + [Output Only] URL of license corresponding to this License + Code. - This field is a member of `oneof`_ ``_subnet_length_range``. + This field is a member of `oneof`_ ``_self_link``. """ - class PortPairRemoteLocation(proto.Enum): - r"""[Output Only] Port pair remote location constraints, which can take - one of the following values: - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to - individual ports, but the UI uses this field when ordering a pair of - ports, to prevent users from accidentally ordering something that is - incompatible with their cloud provider. Specifically, when ordering - a redundant pair of Cross-Cloud Interconnect ports, and one of them - uses a remote location with portPairMatchingRemoteLocation set to - matching, the UI requires that both ports use the same remote - location. + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) - Values: - UNDEFINED_PORT_PAIR_REMOTE_LOCATION (0): - A value indicating that the enum field is not - set. - PORT_PAIR_MATCHING_REMOTE_LOCATION (207291859): - If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud - provider allocates ports in pairs, and the user should - choose the same remote location for both ports. - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION (60609829): - If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt - to provision a redundant pair of Cross-Cloud Interconnects - using two different remote locations in the same city. - """ - UNDEFINED_PORT_PAIR_REMOTE_LOCATION = 0 - PORT_PAIR_MATCHING_REMOTE_LOCATION = 207291859 - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION = 60609829 - class PortPairVlan(proto.Enum): - r"""[Output Only] Port pair VLAN constraints, which can take one of the - following values: PORT_PAIR_UNCONSTRAINED_VLAN, - PORT_PAIR_MATCHING_VLAN +class LicenseResourceCommitment(proto.Message): + r"""Commitment for a particular license resource. - Values: - UNDEFINED_PORT_PAIR_VLAN (0): - A value indicating that the enum field is not - set. - PORT_PAIR_MATCHING_VLAN (250295358): - If PORT_PAIR_MATCHING_VLAN, the Interconnect for this - attachment is part of a pair of ports that should have - matching VLAN allocations. This occurs with Cross-Cloud - Interconnect to Azure remote locations. While GCP's API does - not explicitly group pairs of ports, the UI uses this field - to ensure matching VLAN ids when configuring a redundant - VLAN pair. - PORT_PAIR_UNCONSTRAINED_VLAN (175227948): - PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint. - """ - UNDEFINED_PORT_PAIR_VLAN = 0 - PORT_PAIR_MATCHING_VLAN = 250295358 - PORT_PAIR_UNCONSTRAINED_VLAN = 175227948 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - port_pair_remote_location: str = proto.Field( - proto.STRING, - number=495917351, + Attributes: + amount (int): + The number of licenses you plan to purchase. + + This field is a member of `oneof`_ ``_amount``. + cores_per_license (str): + The number of cores per license. + + This field is a member of `oneof`_ ``_cores_per_license``. + license_ (str): + The applicable license URI. + + This field is a member of `oneof`_ ``_license``. + """ + + amount: int = proto.Field( + proto.INT64, + number=196759640, optional=True, ) - port_pair_vlan: str = proto.Field( + cores_per_license: str = proto.Field( proto.STRING, - number=478214506, + number=32482324, optional=True, ) - subnet_length_range: "InterconnectRemoteLocationConstraintsSubnetLengthRange" = ( - proto.Field( - proto.MESSAGE, - number=184473670, - optional=True, - message="InterconnectRemoteLocationConstraintsSubnetLengthRange", - ) + license_: str = proto.Field( + proto.STRING, + number=166757441, + optional=True, ) -class InterconnectRemoteLocationConstraintsSubnetLengthRange(proto.Message): +class LicenseResourceRequirements(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - max_ (int): + min_guest_cpu_count (int): + [Input Only] Deprecated. This field no longer reflects the + minimum number of guest cpus required to use the Instance. - This field is a member of `oneof`_ ``_max``. - min_ (int): + This field is a member of `oneof`_ ``_min_guest_cpu_count``. + min_memory_mb (int): + [Input Only] Deprecated. This field no longer reflects the + minimum memory required to use the Instance. - This field is a member of `oneof`_ ``_min``. + This field is a member of `oneof`_ ``_min_memory_mb``. """ - max_: int = proto.Field( + min_guest_cpu_count: int = proto.Field( proto.INT32, - number=107876, + number=477964836, optional=True, ) - min_: int = proto.Field( + min_memory_mb: int = proto.Field( proto.INT32, - number=108114, + number=504785894, optional=True, ) -class InterconnectRemoteLocationList(proto.Message): - r"""Response to the list request, and contains a list of - interconnect remote locations. - +class LicensesListResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -64299,19 +72958,12 @@ class InterconnectRemoteLocationList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocation]): - A list of InterconnectRemoteLocation - resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectRemoteLocationList for lists of - interconnect remote locations. - - This field is a member of `oneof`_ ``_kind``. + items (MutableSequence[google.cloud.compute_v1beta.types.License]): + A list of License resources. next_page_token (str): - [Output Only] This token lets you get the next page of + [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -64336,15 +72988,10 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["InterconnectRemoteLocation"] = proto.RepeatedField( + items: MutableSequence["License"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InterconnectRemoteLocation", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, + message="License", ) next_page_token: str = proto.Field( proto.STRING, @@ -64364,727 +73011,1033 @@ def raw_page(self): ) -class InterconnectRemoteLocationPermittedConnections(proto.Message): - r""" +class ListAcceleratorTypesRequest(proto.Message): + r"""A request message for AcceleratorTypes.List. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_location (str): - [Output Only] URL of an Interconnect location that is - permitted to connect to this Interconnect remote location. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_interconnect_location``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - interconnect_location: str = proto.Field( - proto.STRING, - number=492235846, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class InterconnectsGetDiagnosticsResponse(proto.Message): - r"""Response for the InterconnectsGetDiagnosticsRequest. + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - result (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_result``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - result: "InterconnectDiagnostics" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectDiagnostics", - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class InterconnectsGetMacsecConfigResponse(proto.Message): - r"""Response for the InterconnectsGetMacsecConfigRequest. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - etag (str): - end_interface: MixerGetResponseWithEtagBuilder + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_etag``. - result (google.cloud.compute_v1beta.types.InterconnectMacsecConfig): + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_result``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - result: "InterconnectMacsecConfig" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectMacsecConfig", - ) + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. -class InvalidateCacheRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.InvalidateCache. See the - method description for details. + You cannot combine constraints on multiple fields using + regular expressions. + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - Attributes: - cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): - The body resource for this request + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - begin_interface: MixerMutationRequestBuilder Request ID to - support idempotency. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap scoping this request. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ - cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( - proto.MESSAGE, - number=312795565, - message="CacheInvalidationRule", + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, ) - project: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=227560217, + number=160562920, + optional=True, ) - region: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=138946292, + number=19994697, + optional=True, ) - request_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=37109963, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - url_map: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=367020684, + number=3744684, ) -class InvalidateCacheUrlMapRequest(proto.Message): - r"""A request message for UrlMaps.InvalidateCache. See the method +class ListAddressesRequest(proto.Message): + r"""A request message for Addresses.List. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): - The body resource for this request + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + region (str): + Name of the region for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap scoping this request. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. """ - cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( - proto.MESSAGE, - number=312795565, - message="CacheInvalidationRule", + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, ) project: str = proto.Field( proto.STRING, number=227560217, ) - request_id: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=37109963, + number=138946292, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + + +class ListAssociationsFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.ListAssociations. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + include_inherited_policies (bool): + If set to "true", the response will contain a + list of all associations for the containing + folders and the containing organization of the + target. The parameter has no effect if the + target is an organization. + + This field is a member of `oneof`_ ``_include_inherited_policies``. + target_resource (str): + The target resource to list associations. It + is an organization, or a folder. + + This field is a member of `oneof`_ ``_target_resource``. + """ + + include_inherited_policies: bool = proto.Field( + proto.BOOL, + number=32280076, optional=True, ) - url_map: str = proto.Field( + target_resource: str = proto.Field( proto.STRING, - number=367020684, + number=467318524, + optional=True, ) -class Items(proto.Message): - r"""Metadata +class ListAssociationsOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.ListAssociations. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - key (str): - Key for the metadata entry. Keys must conform to the - following regexp: [a-zA-Z0-9-\_]+, and be less than 128 - bytes in length. This is reflected as part of a URL in the - metadata server. Additionally, to avoid ambiguity, keys must - not conflict with any other metadata keys for the project. - - This field is a member of `oneof`_ ``_key``. - value (str): - Value for the metadata entry. These are - free-form strings, and only have meaning as - interpreted by the image running in the - instance. The only restriction placed on values - is that their size must be less than or equal to - 262144 bytes (256 KiB). + target_resource (str): + The target resource to list associations. It + is an organization, or a folder. - This field is a member of `oneof`_ ``_value``. + This field is a member of `oneof`_ ``_target_resource``. """ - key: str = proto.Field( - proto.STRING, - number=106079, - optional=True, - ) - value: str = proto.Field( + target_resource: str = proto.Field( proto.STRING, - number=111972721, + number=467318524, optional=True, ) -class License(proto.Message): - r"""Represents a License resource. A License represents billing and - aggregate usage data for public and marketplace images. *Caution* - This resource is intended for use only by third-party partners who - are creating Cloud Marketplace images. +class ListAutoscalersRequest(proto.Message): + r"""A request message for Autoscalers.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - allowed_replacement_licenses (MutableSequence[str]): - Specifies licenseCodes of licenses that can replace this - license. Note: such replacements are allowed even if - removable_from_disk is false. - appendable_to_disk (bool): - If true, this license can be appended to an - existing disk's set of licenses. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_appendable_to_disk``. - charges_use_fee (bool): - [Output Only] Deprecated. This field no longer reflects - whether a license charges a usage fee. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_charges_use_fee``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional textual description of the - resource; provided by the client when the - resource is created. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + :: - This field is a member of `oneof`_ ``_id``. - incompatible_licenses (MutableSequence[str]): - Specifies licenseCodes of licenses that are - incompatible with this license. If a license is - incompatible with this license, it cannot be - attached to the same disk or image. - kind (str): - [Output Only] Type of resource. Always compute#license for - licenses. + labels.owner:* - This field is a member of `oneof`_ ``_kind``. - license_code (int): - [Output Only] The unique code used to attach this license to - images, snapshots, and disks. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_license_code``. - minimum_retention (google.cloud.compute_v1beta.types.Duration): - If set, this license will be unable to be removed or - replaced once attached to a disk until the minimum_retention - period has passed. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_minimum_retention``. - multi_tenant_only (bool): - If true, this license can only be used on VMs - on multi tenant nodes. + :: - This field is a member of `oneof`_ ``_multi_tenant_only``. - name (str): - Name of the resource. The name must be 1-63 - characters long and comply with RFC1035. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_name``. - os_license (bool): - If true, indicates this is an OS license. - Only one OS license can be attached to a disk or - image at a time. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_os_license``. - removable_from_disk (bool): - If true, this license can be removed from a - disk's set of licenses, with no replacement - license needed. + :: - This field is a member of `oneof`_ ``_removable_from_disk``. - required_coattached_licenses (MutableSequence[str]): - Specifies the set of permissible coattached - licenseCodes of licenses that satisfy the - coattachment requirement of this license. At - least one license from the set must be attached - to the same disk or image as this license. - resource_requirements (google.cloud.compute_v1beta.types.LicenseResourceRequirements): - [Input Only] Deprecated. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_resource_requirements``. - self_link (str): - [Output Only] Server-defined URL for the resource. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_self_link_with_id``. - sole_tenant_only (bool): - If true, this license can only be used on VMs - on sole tenant nodes. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_sole_tenant_only``. - transferable (bool): - If false, licenses will not be copied from - the source resource when creating an image from - a disk, disk from snapshot, or snapshot from - disk. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - This field is a member of `oneof`_ ``_transferable``. - update_timestamp (str): - [Output Only] Last update timestamp in RFC3339 text format. + You cannot combine constraints on multiple fields using + regular expressions. - This field is a member of `oneof`_ ``_update_timestamp``. + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. """ - allowed_replacement_licenses: MutableSequence[str] = proto.RepeatedField( + filter: str = proto.Field( proto.STRING, - number=195677718, - ) - appendable_to_disk: bool = proto.Field( - proto.BOOL, - number=16959254, + number=336120696, optional=True, ) - charges_use_fee: bool = proto.Field( - proto.BOOL, - number=372412622, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - creation_timestamp: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=30525366, + number=160562920, optional=True, ) - description: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, + number=19994697, optional=True, ) - incompatible_licenses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=334239768, - ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, - ) - license_code: int = proto.Field( - proto.UINT64, - number=1467179, - optional=True, - ) - minimum_retention: "Duration" = proto.Field( - proto.MESSAGE, - number=155398189, - optional=True, - message="Duration", + number=227560217, ) - multi_tenant_only: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=274395163, + number=517198390, optional=True, ) - name: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=3744684, ) - os_license: bool = proto.Field( - proto.BOOL, - number=487986406, + + +class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): + r"""A request message for + RegionSslPolicies.ListAvailableFeatures. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - removable_from_disk: bool = proto.Field( - proto.BOOL, - number=25854638, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - required_coattached_licenses: MutableSequence[str] = proto.RepeatedField( + order_by: str = proto.Field( proto.STRING, - number=129195265, - ) - resource_requirements: "LicenseResourceRequirements" = proto.Field( - proto.MESSAGE, - number=214292769, + number=160562920, optional=True, - message="LicenseResourceRequirements", ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - self_link_with_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=44520962, - optional=True, + number=227560217, ) - sole_tenant_only: bool = proto.Field( - proto.BOOL, - number=427525559, - optional=True, + region: str = proto.Field( + proto.STRING, + number=138946292, ) - transferable: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=4349893, - optional=True, - ) - update_timestamp: str = proto.Field( - proto.STRING, - number=120894752, + number=517198390, optional=True, ) -class LicenseCode(proto.Message): - r"""Represents a License Code resource. A License Code is a unique - identifier used to represent a license resource. *Caution* This - resource is intended for use only by third-party partners who are - creating Cloud Marketplace images. +class ListAvailableFeaturesSslPoliciesRequest(proto.Message): + r"""A request message for SslPolicies.ListAvailableFeatures. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - [Output Only] Description of this License Code. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of resource. Always compute#licenseCode - for licenses. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_kind``. - license_alias (MutableSequence[google.cloud.compute_v1beta.types.LicenseCodeLicenseAlias]): - [Output Only] URL and description aliases of Licenses with - the same License Code. - name (str): - [Output Only] Name of the resource. The name is 1-20 - characters long and must be a valid 64 bit integer. + :: - This field is a member of `oneof`_ ``_name``. - self_link (str): - [Output Only] Server-defined URL for the resource. + labels.owner:* - This field is a member of `oneof`_ ``_self_link``. - state (str): - [Output Only] Current state of this License Code. Check the - State enum for the list of possible values. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_state``. - transferable (bool): - [Output Only] If true, the license will remain attached when - creating images or snapshots from disks. Otherwise, the - license is not transferred. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_transferable``. - """ + :: - class State(proto.Enum): - r"""[Output Only] Current state of this License Code. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - DISABLED (516696700): - Machines are not allowed to attach boot disks - with this License Code. Requests to create new - resources with this license will be rejected. - ENABLED (182130465): - Use is allowed for anyone with USE_READ_ONLY access to this - License Code. - RESTRICTED (261551195): - Use of this license is limited to a project - whitelist. - STATE_UNSPECIFIED (470755401): - No description available. - TERMINATED (250018339): - Reserved state. - """ - UNDEFINED_STATE = 0 - DISABLED = 516696700 - ENABLED = 182130465 - RESTRICTED = 261551195 - STATE_UNSPECIFIED = 470755401 - TERMINATED = 250018339 + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - description: str = proto.Field( + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, + number=336120696, optional=True, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - license_alias: MutableSequence["LicenseCodeLicenseAlias"] = proto.RepeatedField( - proto.MESSAGE, - number=43550930, - message="LicenseCodeLicenseAlias", - ) - name: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3373707, + number=160562920, optional=True, ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - state: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=109757585, - optional=True, + number=227560217, ) - transferable: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=4349893, + number=517198390, optional=True, ) -class LicenseCodeLicenseAlias(proto.Message): - r""" +class ListBackendBucketsRequest(proto.Message): + r"""A request message for BackendBuckets.List. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - [Output Only] Description of this License Code. - - This field is a member of `oneof`_ ``_description``. - self_link (str): - [Output Only] URL of license corresponding to this License - Code. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_self_link``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class LicenseResourceCommitment(proto.Message): - r"""Commitment for a particular license resource. + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - amount (int): - The number of licenses you plan to purchase. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_amount``. - cores_per_license (str): - The number of cores per license. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_cores_per_license``. - license_ (str): - The applicable license URI. + :: - This field is a member of `oneof`_ ``_license``. - """ + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - amount: int = proto.Field( - proto.INT64, - number=196759640, - optional=True, - ) - cores_per_license: str = proto.Field( - proto.STRING, - number=32482324, - optional=True, - ) - license_: str = proto.Field( - proto.STRING, - number=166757441, - optional=True, - ) + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + :: -class LicenseResourceRequirements(proto.Message): - r""" + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - Attributes: - min_guest_cpu_count (int): - [Input Only] Deprecated. This field no longer reflects the - minimum number of guest cpus required to use the Instance. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_min_guest_cpu_count``. - min_memory_mb (int): - [Input Only] Deprecated. This field no longer reflects the - minimum memory required to use the Instance. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_min_memory_mb``. - """ + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - min_guest_cpu_count: int = proto.Field( - proto.INT32, - number=477964836, - optional=True, - ) - min_memory_mb: int = proto.Field( - proto.INT32, - number=504785894, - optional=True, - ) + You cannot combine constraints on multiple fields using + regular expressions. + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) -class LicensesListResponse(proto.Message): - r""" + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.License]): - A list of License resources. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_return_partial_success``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=3355, + number=336120696, optional=True, ) - items: MutableSequence["License"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="License", + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - next_page_token: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=79797525, + number=160562920, optional=True, ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", ) -class ListAcceleratorTypesRequest(proto.Message): - r"""A request message for AcceleratorTypes.List. See the method +class ListBackendServicesRequest(proto.Message): + r"""A request message for BackendServices.List. See the method description for details. @@ -65097,42 +74050,69 @@ class ListAcceleratorTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65147,13 +74127,17 @@ class ListAcceleratorTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65168,15 +74152,14 @@ class ListAcceleratorTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -65208,62 +74191,97 @@ class ListAcceleratorTypesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListAddressesRequest(proto.Message): - r"""A request message for Addresses.List. See the method +class ListBgpRoutesRoutersRequest(proto.Message): + r"""A request message for Routers.ListBgpRoutes. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + address_family (str): + (Required) limit results to this address + family (either IPv4 or IPv6) Check the + AddressFamily enum for the list of possible + values. + + This field is a member of `oneof`_ ``_address_family``. + destination_prefix (str): + Limit results to destinations that are + subnets of this CIDR range + + This field is a member of `oneof`_ ``_destination_prefix``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65278,13 +74296,17 @@ class ListAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65294,6 +74316,16 @@ class ListAddressesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. + peer (str): + (Required) limit results to the BGP peer with + the given name. Name should conform to RFC1035. + + This field is a member of `oneof`_ ``_peer``. + policy_applied (bool): + When true, the method returns post-policy + routes. Otherwise, it returns pre-policy routes. + + This field is a member of `oneof`_ ``_policy_applied``. project (str): Project ID for this request. region (str): @@ -65301,15 +74333,76 @@ class ListAddressesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + route_type (str): + (Required) limit results to this type of + route (either LEARNED or ADVERTISED) + Check the RouteType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_route_type``. + router (str): + Name or id of the resource for this request. + Name should conform to RFC1035. """ + class AddressFamily(proto.Enum): + r"""(Required) limit results to this address family (either IPv4 + or IPv6) + + Values: + UNDEFINED_ADDRESS_FAMILY (0): + A value indicating that the enum field is not + set. + IPV4 (2254341): + No description available. + IPV6 (2254343): + No description available. + UNSPECIFIED_IP_VERSION (72938440): + No description available. + """ + UNDEFINED_ADDRESS_FAMILY = 0 + IPV4 = 2254341 + IPV6 = 2254343 + UNSPECIFIED_IP_VERSION = 72938440 + + class RouteType(proto.Enum): + r"""(Required) limit results to this type of route (either + LEARNED or ADVERTISED) + + Values: + UNDEFINED_ROUTE_TYPE (0): + A value indicating that the enum field is not + set. + ADVERTISED (20302109): + No description available. + LEARNED (231892419): + No description available. + UNSPECIFIED_ROUTE_TYPE (248064440): + No description available. + """ + UNDEFINED_ROUTE_TYPE = 0 + ADVERTISED = 20302109 + LEARNED = 231892419 + UNSPECIFIED_ROUTE_TYPE = 248064440 + + address_family: str = proto.Field( + proto.STRING, + number=173744655, + optional=True, + ) + destination_prefix: str = proto.Field( + proto.STRING, + number=263872483, + optional=True, + ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -65330,6 +74423,16 @@ class ListAddressesRequest(proto.Message): number=19994697, optional=True, ) + peer: str = proto.Field( + proto.STRING, + number=3436898, + optional=True, + ) + policy_applied: bool = proto.Field( + proto.BOOL, + number=379464304, + optional=True, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -65343,55 +74446,19 @@ class ListAddressesRequest(proto.Message): number=517198390, optional=True, ) - - -class ListAssociationsFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.ListAssociations. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - target_resource (str): - The target resource to list associations. It - is an organization, or a folder. - - This field is a member of `oneof`_ ``_target_resource``. - """ - - target_resource: str = proto.Field( + route_type: str = proto.Field( proto.STRING, - number=467318524, + number=375888752, optional=True, ) - - -class ListAssociationsOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.ListAssociations. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - target_resource (str): - The target resource to list associations. It - is an organization, or a folder. - - This field is a member of `oneof`_ ``_target_resource``. - """ - - target_resource: str = proto.Field( + router: str = proto.Field( proto.STRING, - number=467318524, - optional=True, + number=148608841, ) -class ListAutoscalersRequest(proto.Message): - r"""A request message for Autoscalers.List. See the method +class ListCrossSiteNetworksRequest(proto.Message): + r"""A request message for CrossSiteNetworks.List. See the method description for details. @@ -65404,42 +74471,69 @@ class ListAutoscalersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65454,13 +74548,17 @@ class ListAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65475,15 +74573,14 @@ class ListAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. """ filter: str = proto.Field( @@ -65515,15 +74612,10 @@ class ListAutoscalersRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): - r"""A request message for - RegionSslPolicies.ListAvailableFeatures. See the method +class ListDiskTypesRequest(proto.Message): + r"""A request message for DiskTypes.List. See the method description for details. @@ -65536,42 +74628,69 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65586,13 +74705,17 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65604,18 +74727,19 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -65642,20 +74766,20 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListAvailableFeaturesSslPoliciesRequest(proto.Message): - r"""A request message for SslPolicies.ListAvailableFeatures. See - the method description for details. +class ListDisksRequest(proto.Message): + r"""A request message for Disks.List. See the method description + for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -65667,42 +74791,69 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65717,13 +74868,17 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65738,13 +74893,16 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -65776,10 +74934,14 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListBackendBucketsRequest(proto.Message): - r"""A request message for BackendBuckets.List. See the method +class ListDisksStoragePoolsRequest(proto.Message): + r"""A request message for StoragePools.ListDisks. See the method description for details. @@ -65792,42 +74954,69 @@ class ListBackendBucketsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65842,13 +75031,17 @@ class ListBackendBucketsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65863,13 +75056,18 @@ class ListBackendBucketsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + storage_pool (str): + Name of the storage pool to list disks of. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -65901,11 +75099,19 @@ class ListBackendBucketsRequest(proto.Message): number=517198390, optional=True, ) + storage_pool: str = proto.Field( + proto.STRING, + number=360473440, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListBackendServicesRequest(proto.Message): - r"""A request message for BackendServices.List. See the method - description for details. +class ListErrorsInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.ListErrors. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -65917,44 +75123,76 @@ class ListBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It must be a string + that meets the requirements in RFC1035, or an unsigned long + integer: must match regexp pattern: + (?:`a-z `__?)|1-9{0,19}. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -65967,13 +75205,17 @@ class ListBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65988,13 +75230,18 @@ class ListBackendServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. + It should conform to RFC1035. """ filter: str = proto.Field( @@ -66002,6 +75249,10 @@ class ListBackendServicesRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -66026,72 +75277,96 @@ class ListBackendServicesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListBgpRoutesRoutersRequest(proto.Message): - r"""A request message for Routers.ListBgpRoutes. See the method - description for details. +class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.ListErrors. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address_family (str): - (Required) limit results to this address - family (either IPv4 or IPv6) Check the - AddressFamily enum for the list of possible - values. - - This field is a member of `oneof`_ ``_address_family``. - destination_prefix (str): - Limit results to destinations that are - subnets of this CIDR range - - This field is a member of `oneof`_ ``_destination_prefix``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It must be a string + that meets the requirements in RFC1035, or an unsigned long + integer: must match regexp pattern: + (?:`a-z `__?)|1-9{0,19}. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -66104,13 +75379,17 @@ class ListBgpRoutesRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66120,96 +75399,33 @@ class ListBgpRoutesRoutersRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - peer (str): - (Required) limit results to the BGP peer with - the given name. Name should conform to RFC1035. - - This field is a member of `oneof`_ ``_peer``. - policy_applied (bool): - When true, the method returns post-policy - routes. Otherwise, it returns pre-policy routes. - - This field is a member of `oneof`_ ``_policy_applied``. project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. + This should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - route_type (str): - (Required) limit results to this type of - route (either LEARNED or ADVERTISED) Check the - RouteType enum for the list of possible values. - - This field is a member of `oneof`_ ``_route_type``. - router (str): - Name or id of the resource for this request. - Name should conform to RFC1035. """ - class AddressFamily(proto.Enum): - r"""(Required) limit results to this address family (either IPv4 - or IPv6) - - Values: - UNDEFINED_ADDRESS_FAMILY (0): - A value indicating that the enum field is not - set. - IPV4 (2254341): - No description available. - IPV6 (2254343): - No description available. - UNSPECIFIED_IP_VERSION (72938440): - No description available. - """ - UNDEFINED_ADDRESS_FAMILY = 0 - IPV4 = 2254341 - IPV6 = 2254343 - UNSPECIFIED_IP_VERSION = 72938440 - - class RouteType(proto.Enum): - r"""(Required) limit results to this type of route (either - LEARNED or ADVERTISED) - - Values: - UNDEFINED_ROUTE_TYPE (0): - A value indicating that the enum field is not - set. - ADVERTISED (20302109): - No description available. - LEARNED (231892419): - No description available. - UNSPECIFIED_ROUTE_TYPE (248064440): - No description available. - """ - UNDEFINED_ROUTE_TYPE = 0 - ADVERTISED = 20302109 - LEARNED = 231892419 - UNSPECIFIED_ROUTE_TYPE = 248064440 - - address_family: str = proto.Field( - proto.STRING, - number=173744655, - optional=True, - ) - destination_prefix: str = proto.Field( - proto.STRING, - number=263872483, - optional=True, - ) filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -66225,16 +75441,6 @@ class RouteType(proto.Enum): number=19994697, optional=True, ) - peer: str = proto.Field( - proto.STRING, - number=3436898, - optional=True, - ) - policy_applied: bool = proto.Field( - proto.BOOL, - number=379464304, - optional=True, - ) project: str = proto.Field( proto.STRING, number=227560217, @@ -66248,20 +75454,11 @@ class RouteType(proto.Enum): number=517198390, optional=True, ) - route_type: str = proto.Field( - proto.STRING, - number=375888752, - optional=True, - ) - router: str = proto.Field( - proto.STRING, - number=148608841, - ) -class ListCrossSiteNetworksRequest(proto.Message): - r"""A request message for CrossSiteNetworks.List. See the method - description for details. +class ListExternalVpnGatewaysRequest(proto.Message): + r"""A request message for ExternalVpnGateways.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66273,42 +75470,69 @@ class ListCrossSiteNetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66323,13 +75547,17 @@ class ListCrossSiteNetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66344,10 +75572,11 @@ class ListCrossSiteNetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -66384,8 +75613,8 @@ class ListCrossSiteNetworksRequest(proto.Message): ) -class ListDiskTypesRequest(proto.Message): - r"""A request message for DiskTypes.List. See the method +class ListFirewallPoliciesRequest(proto.Message): + r"""A request message for FirewallPolicies.List. See the method description for details. @@ -66398,42 +75627,69 @@ class ListDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66448,13 +75704,17 @@ class ListDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66464,20 +75724,24 @@ class ListDiskTypesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. + parent_id (str): + Parent ID for this request. The ID can be either be + "folders/[FOLDER_ID]" if the parent is a folder or + "organizations/[ORGANIZATION_ID]" if the parent is an + organization. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -66500,24 +75764,21 @@ class ListDiskTypesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=227560217, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListDisksRequest(proto.Message): - r"""A request message for Disks.List. See the method description - for details. +class ListFirewallsRequest(proto.Message): + r"""A request message for Firewalls.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66529,42 +75790,69 @@ class ListDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66579,13 +75867,17 @@ class ListDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66600,15 +75892,14 @@ class ListDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -66640,14 +75931,10 @@ class ListDisksRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListDisksStoragePoolsRequest(proto.Message): - r"""A request message for StoragePools.ListDisks. See the method +class ListForwardingRulesRequest(proto.Message): + r"""A request message for ForwardingRules.List. See the method description for details. @@ -66660,42 +75947,69 @@ class ListDisksStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66710,13 +76024,17 @@ class ListDisksStoragePoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66728,20 +76046,19 @@ class ListDisksStoragePoolsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - storage_pool (str): - Name of the storage pool to list disks of. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -66768,24 +76085,20 @@ class ListDisksStoragePoolsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - storage_pool: str = proto.Field( - proto.STRING, - number=360473440, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListErrorsInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.ListErrors. See - the method description for details. +class ListFutureReservationsRequest(proto.Message): + r"""A request message for FutureReservations.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66797,49 +76110,71 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It must be a string - that meets the requirements in RFC1035, or an unsigned long - integer: must match regexp pattern: - (?:`a-z `__?)|1-9{0,19}. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -66852,13 +76187,17 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66873,17 +76212,17 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + Name of the zone for this request. Name + should conform to RFC1035. """ filter: str = proto.Field( @@ -66891,10 +76230,6 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -66925,9 +76260,9 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): ) -class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.ListErrors. - See the method description for details. +class ListGlobalAddressesRequest(proto.Message): + r"""A request message for GlobalAddresses.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66939,49 +76274,71 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It must be a string - that meets the requirements in RFC1035, or an unsigned long - integer: must match regexp pattern: - (?:`a-z `__?)|1-9{0,19}. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -66994,13 +76351,17 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67012,16 +76373,14 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. This - should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67032,10 +76391,6 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -67055,10 +76410,6 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -67066,8 +76417,8 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): ) -class ListExternalVpnGatewaysRequest(proto.Message): - r"""A request message for ExternalVpnGateways.List. See the +class ListGlobalForwardingRulesRequest(proto.Message): + r"""A request message for GlobalForwardingRules.List. See the method description for details. @@ -67080,167 +76431,69 @@ class ListExternalVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + mixed in one request. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) - - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListFirewallPoliciesRequest(proto.Message): - r"""A request message for FirewallPolicies.List. See the method - description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67255,13 +76508,17 @@ class ListFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67271,20 +76528,16 @@ class ListFirewallPoliciesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. The ID can be either be - "folders/[FOLDER_ID]" if the parent is a folder or - "organizations/[ORGANIZATION_ID]" if the parent is an - organization. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67310,10 +76563,9 @@ class ListFirewallPoliciesRequest(proto.Message): number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -67322,9 +76574,9 @@ class ListFirewallPoliciesRequest(proto.Message): ) -class ListFirewallsRequest(proto.Message): - r"""A request message for Firewalls.List. See the method - description for details. +class ListGlobalNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for GlobalNetworkEndpointGroups.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67336,167 +76588,69 @@ class ListFirewallsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_return_partial_success``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class ListForwardingRulesRequest(proto.Message): - r"""A request message for ForwardingRules.List. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67511,13 +76665,17 @@ class ListForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67529,15 +76687,14 @@ class ListForwardingRulesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67567,10 +76724,6 @@ class ListForwardingRulesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -67578,8 +76731,8 @@ class ListForwardingRulesRequest(proto.Message): ) -class ListFutureReservationsRequest(proto.Message): - r"""A request message for FutureReservations.List. See the method +class ListGlobalOperationsRequest(proto.Message): + r"""A request message for GlobalOperations.List. See the method description for details. @@ -67592,42 +76745,69 @@ class ListFutureReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67642,13 +76822,17 @@ class ListFutureReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67663,16 +76847,14 @@ class ListFutureReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. Name - should conform to RFC1035. """ filter: str = proto.Field( @@ -67704,15 +76886,11 @@ class ListFutureReservationsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListGlobalAddressesRequest(proto.Message): - r"""A request message for GlobalAddresses.List. See the method - description for details. +class ListGlobalOrganizationOperationsRequest(proto.Message): + r"""A request message for GlobalOrganizationOperations.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67724,42 +76902,69 @@ class ListGlobalAddressesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67774,13 +76979,17 @@ class ListGlobalAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67790,15 +76999,18 @@ class ListGlobalAddressesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67824,9 +77036,10 @@ class ListGlobalAddressesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=227560217, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -67835,9 +77048,9 @@ class ListGlobalAddressesRequest(proto.Message): ) -class ListGlobalForwardingRulesRequest(proto.Message): - r"""A request message for GlobalForwardingRules.List. See the - method description for details. +class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for GlobalPublicDelegatedPrefixes.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67849,42 +77062,69 @@ class ListGlobalForwardingRulesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67899,13 +77139,17 @@ class ListGlobalForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67920,10 +77164,11 @@ class ListGlobalForwardingRulesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67960,9 +77205,9 @@ class ListGlobalForwardingRulesRequest(proto.Message): ) -class ListGlobalNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for GlobalNetworkEndpointGroups.List. See - the method description for details. +class ListHealthChecksRequest(proto.Message): + r"""A request message for HealthChecks.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67974,42 +77219,69 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68024,13 +77296,17 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68045,10 +77321,11 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -68085,9 +77362,9 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): ) -class ListGlobalOperationsRequest(proto.Message): - r"""A request message for GlobalOperations.List. See the method - description for details. +class ListImagesRequest(proto.Message): + r"""A request message for Images.List. See the method description + for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68099,42 +77376,69 @@ class ListGlobalOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68149,13 +77453,17 @@ class ListGlobalOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68170,13 +77478,18 @@ class ListGlobalOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The zone query parameter. + + This field is a member of `oneof`_ ``_zone``. """ filter: str = proto.Field( @@ -68208,11 +77521,17 @@ class ListGlobalOperationsRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + optional=True, + ) -class ListGlobalOrganizationOperationsRequest(proto.Message): - r"""A request message for GlobalOrganizationOperations.List. See - the method description for details. +class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): + r"""A request message for + InstanceGroupManagerResizeRequests.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68224,44 +77543,74 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. The + name should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -68274,13 +77623,17 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68290,20 +77643,23 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. The name should + conform to RFC1035. """ filter: str = proto.Field( @@ -68311,6 +77667,10 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -68326,21 +77686,24 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for GlobalPublicDelegatedPrefixes.List. See - the method description for details. +class ListInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68352,42 +77715,69 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68402,13 +77792,17 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68423,13 +77817,17 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. """ filter: str = proto.Field( @@ -68461,10 +77859,14 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListHealthChecksRequest(proto.Message): - r"""A request message for HealthChecks.List. See the method +class ListInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.List. See the method description for details. @@ -68477,42 +77879,69 @@ class ListHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68527,13 +77956,17 @@ class ListHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68548,13 +77981,17 @@ class ListHealthChecksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone + where the instance group is located. """ filter: str = proto.Field( @@ -68586,11 +78023,15 @@ class ListHealthChecksRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListImagesRequest(proto.Message): - r"""A request message for Images.List. See the method description - for details. +class ListInstanceTemplatesRequest(proto.Message): + r"""A request message for InstanceTemplates.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68602,42 +78043,69 @@ class ListImagesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68652,13 +78120,17 @@ class ListImagesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68673,19 +78145,42 @@ class ListImagesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The zone query parameter. + view (str): + View of the instance template. + Check the View enum for the list of possible + values. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_view``. """ + class View(proto.Enum): + r"""View of the instance template. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -68715,17 +78210,16 @@ class ListImagesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( + view: str = proto.Field( proto.STRING, - number=3744684, + number=3619493, optional=True, ) -class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): - r"""A request message for - InstanceGroupManagerResizeRequests.List. See the method - description for details. +class ListInstancesInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.ListInstances. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68737,47 +78231,76 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035. + instance_group (str): + The name of the instance group from which you + want to generate a list of included instances. + instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsListInstancesRequest): + The body resource for this request max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -68790,13 +78313,17 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68811,17 +78338,17 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the managed - instance group is located. The name should - conform to RFC1035. + The name of the zone + where the instance group is located. """ filter: str = proto.Field( @@ -68829,9 +78356,14 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( + instance_group: str = proto.Field( proto.STRING, - number=249363395, + number=81095253, + ) + instance_groups_list_instances_request_resource: "InstanceGroupsListInstancesRequest" = proto.Field( + proto.MESSAGE, + number=476255263, + message="InstanceGroupsListInstancesRequest", ) max_results: int = proto.Field( proto.UINT32, @@ -68863,9 +78395,9 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): ) -class ListInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.List. See the - method description for details. +class ListInstancesRegionInstanceGroupsRequest(proto.Message): + r"""A request message for RegionInstanceGroups.ListInstances. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68877,44 +78409,74 @@ class ListInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group (str): + Name of the regional instance group for which + we want to list the instances. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -68927,13 +78489,17 @@ class ListInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68945,19 +78511,21 @@ class ListInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. + region_instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest): + The body resource for this request return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the managed - instance group is located. """ filter: str = proto.Field( @@ -68965,6 +78533,10 @@ class ListInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -68984,19 +78556,24 @@ class ListInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_groups_list_instances_request_resource: "RegionInstanceGroupsListInstancesRequest" = proto.Field( + proto.MESSAGE, + number=48239828, + message="RegionInstanceGroupsListInstancesRequest", + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.List. See the method +class ListInstancesRequest(proto.Message): + r"""A request message for Instances.List. See the method description for details. @@ -69009,42 +78586,69 @@ class ListInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69059,13 +78663,17 @@ class ListInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69080,18 +78688,44 @@ class ListInstanceGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + view (str): + View of the instance. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone for this request. """ + class View(proto.Enum): + r"""View of the instance. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -69121,14 +78755,19 @@ class ListInstanceGroupsRequest(proto.Message): number=517198390, optional=True, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class ListInstanceTemplatesRequest(proto.Message): - r"""A request message for InstanceTemplates.List. See the method +class ListInstantSnapshotsRequest(proto.Message): + r"""A request message for InstantSnapshots.List. See the method description for details. @@ -69141,42 +78780,69 @@ class ListInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69191,13 +78857,17 @@ class ListInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69212,41 +78882,18 @@ class ListInstanceTemplatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - view (str): - View of the instance template. - Check the View enum for the list of possible - values. - - This field is a member of `oneof`_ ``_view``. + zone (str): + The name of the zone for this request. """ - class View(proto.Enum): - r"""View of the instance template. - - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 - filter: str = proto.Field( proto.STRING, number=336120696, @@ -69276,16 +78923,15 @@ class View(proto.Enum): number=517198390, optional=True, ) - view: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=3619493, - optional=True, + number=3744684, ) -class ListInstancesInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.ListInstances. See the - method description for details. +class ListInterconnectAttachmentGroupsRequest(proto.Message): + r"""A request message for InterconnectAttachmentGroups.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69297,49 +78943,71 @@ class ListInstancesInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group (str): - The name of the instance group from which you - want to generate a list of included instances. - instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsListInstancesRequest): - The body resource for this request max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -69352,13 +79020,17 @@ class ListInstancesInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69373,16 +79045,14 @@ class ListInstancesInstanceGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the instance group - is located. """ filter: str = proto.Field( @@ -69390,15 +79060,6 @@ class ListInstancesInstanceGroupsRequest(proto.Message): number=336120696, optional=True, ) - instance_group: str = proto.Field( - proto.STRING, - number=81095253, - ) - instance_groups_list_instances_request_resource: "InstanceGroupsListInstancesRequest" = proto.Field( - proto.MESSAGE, - number=476255263, - message="InstanceGroupsListInstancesRequest", - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -69423,15 +79084,11 @@ class ListInstancesInstanceGroupsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstancesRegionInstanceGroupsRequest(proto.Message): - r"""A request message for RegionInstanceGroups.ListInstances. See - the method description for details. +class ListInterconnectAttachmentsRequest(proto.Message): + r"""A request message for InterconnectAttachments.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69443,47 +79100,71 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group (str): - Name of the regional instance group for which - we want to list the instances. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -69496,13 +79177,17 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69515,16 +79200,15 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. - region_instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest): - The body resource for this request + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -69535,10 +79219,6 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): number=336120696, optional=True, ) - instance_group: str = proto.Field( - proto.STRING, - number=81095253, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -69562,11 +79242,6 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): proto.STRING, number=138946292, ) - region_instance_groups_list_instances_request_resource: "RegionInstanceGroupsListInstancesRequest" = proto.Field( - proto.MESSAGE, - number=48239828, - message="RegionInstanceGroupsListInstancesRequest", - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -69574,8 +79249,8 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): ) -class ListInstancesRequest(proto.Message): - r"""A request message for Instances.List. See the method +class ListInterconnectGroupsRequest(proto.Message): + r"""A request message for InterconnectGroups.List. See the method description for details. @@ -69588,42 +79263,69 @@ class ListInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69638,13 +79340,17 @@ class ListInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69659,43 +79365,16 @@ class ListInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - view (str): - View of the instance. - Check the View enum for the list of possible - values. - - This field is a member of `oneof`_ ``_view``. - zone (str): - The name of the zone for this request. """ - class View(proto.Enum): - r"""View of the instance. - - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 - filter: str = proto.Field( proto.STRING, number=336120696, @@ -69725,20 +79404,11 @@ class View(proto.Enum): number=517198390, optional=True, ) - view: str = proto.Field( - proto.STRING, - number=3619493, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstantSnapshotsRequest(proto.Message): - r"""A request message for InstantSnapshots.List. See the method - description for details. +class ListInterconnectLocationsRequest(proto.Message): + r"""A request message for InterconnectLocations.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69750,42 +79420,69 @@ class ListInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69800,13 +79497,17 @@ class ListInstantSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69821,15 +79522,14 @@ class ListInstantSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -69861,14 +79561,10 @@ class ListInstantSnapshotsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInterconnectAttachmentGroupsRequest(proto.Message): - r"""A request message for InterconnectAttachmentGroups.List. See +class ListInterconnectRemoteLocationsRequest(proto.Message): + r"""A request message for InterconnectRemoteLocations.List. See the method description for details. @@ -69881,42 +79577,69 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69931,13 +79654,17 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69952,10 +79679,11 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -69992,9 +79720,9 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): ) -class ListInterconnectAttachmentsRequest(proto.Message): - r"""A request message for InterconnectAttachments.List. See the - method description for details. +class ListInterconnectsRequest(proto.Message): + r"""A request message for Interconnects.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -70006,42 +79734,69 @@ class ListInterconnectAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70056,13 +79811,17 @@ class ListInterconnectAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70074,15 +79833,14 @@ class ListInterconnectAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70112,10 +79870,6 @@ class ListInterconnectAttachmentsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -70123,8 +79877,8 @@ class ListInterconnectAttachmentsRequest(proto.Message): ) -class ListInterconnectGroupsRequest(proto.Message): - r"""A request message for InterconnectGroups.List. See the method +class ListLicensesRequest(proto.Message): + r"""A request message for Licenses.List. See the method description for details. @@ -70137,167 +79891,69 @@ class ListInterconnectGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. - - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + mixed in one request. - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListInterconnectLocationsRequest(proto.Message): - r"""A request message for InterconnectLocations.List. See the - method description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70312,13 +79968,17 @@ class ListInterconnectLocationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70333,10 +79993,11 @@ class ListInterconnectLocationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70373,9 +80034,9 @@ class ListInterconnectLocationsRequest(proto.Message): ) -class ListInterconnectRemoteLocationsRequest(proto.Message): - r"""A request message for InterconnectRemoteLocations.List. See - the method description for details. +class ListMachineImagesRequest(proto.Message): + r"""A request message for MachineImages.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -70387,42 +80048,69 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70437,13 +80125,17 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70458,10 +80150,11 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70498,8 +80191,8 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): ) -class ListInterconnectsRequest(proto.Message): - r"""A request message for Interconnects.List. See the method +class ListMachineTypesRequest(proto.Message): + r"""A request message for MachineTypes.List. See the method description for details. @@ -70512,42 +80205,69 @@ class ListInterconnectsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70562,13 +80282,17 @@ class ListInterconnectsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70583,13 +80307,16 @@ class ListInterconnectsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -70621,10 +80348,15 @@ class ListInterconnectsRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListLicensesRequest(proto.Message): - r"""A request message for Licenses.List. See the method +class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.ListManagedInstances. See the method description for details. @@ -70637,44 +80369,73 @@ class ListLicensesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -70687,13 +80448,17 @@ class ListLicensesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70708,13 +80473,17 @@ class ListLicensesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. """ filter: str = proto.Field( @@ -70722,6 +80491,10 @@ class ListLicensesRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -70746,10 +80519,15 @@ class ListLicensesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListMachineImagesRequest(proto.Message): - r"""A request message for MachineImages.List. See the method +class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ListManagedInstances. See the method description for details. @@ -70762,44 +80540,73 @@ class ListMachineImagesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -70812,13 +80619,17 @@ class ListMachineImagesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70830,13 +80641,16 @@ class ListMachineImagesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70847,6 +80661,10 @@ class ListMachineImagesRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -70866,6 +80684,10 @@ class ListMachineImagesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -70873,8 +80695,8 @@ class ListMachineImagesRequest(proto.Message): ) -class ListMachineTypesRequest(proto.Message): - r"""A request message for MachineTypes.List. See the method +class ListNetworkAttachmentsRequest(proto.Message): + r"""A request message for NetworkAttachments.List. See the method description for details. @@ -70887,42 +80709,69 @@ class ListMachineTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70937,13 +80786,17 @@ class ListMachineTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70955,18 +80808,19 @@ class ListMachineTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -70993,21 +80847,20 @@ class ListMachineTypesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.ListManagedInstances. See the method - description for details. +class ListNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71019,46 +80872,71 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -71071,13 +80949,17 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71092,16 +80974,18 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the managed - instance group is located. + The name of thezone + where the network endpoint group is located. It + should comply with RFC1035. """ filter: str = proto.Field( @@ -71109,10 +80993,6 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -71143,9 +81023,9 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): ) -class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): +class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): r"""A request message for - RegionInstanceGroupManagers.ListManagedInstances. See the method + GlobalNetworkEndpointGroups.ListNetworkEndpoints. See the method description for details. @@ -71158,46 +81038,71 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -71207,16 +81112,25 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71228,15 +81142,14 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71247,15 +81160,15 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71270,10 +81183,6 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -71281,8 +81190,9 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): ) -class ListNetworkAttachmentsRequest(proto.Message): - r"""A request message for NetworkAttachments.List. See the method +class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for + NetworkEndpointGroups.ListNetworkEndpoints. See the method description for details. @@ -71295,42 +81205,69 @@ class ListNetworkAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71342,16 +81279,27 @@ class ListNetworkAttachmentsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. + network_endpoint_groups_list_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsListEndpointsRequest): + The body resource for this request order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71363,18 +81311,21 @@ class ListNetworkAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ filter: str = proto.Field( @@ -71387,6 +81338,15 @@ class ListNetworkAttachmentsRequest(proto.Message): number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + network_endpoint_groups_list_endpoints_request_resource: "NetworkEndpointGroupsListEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=59493390, + message="NetworkEndpointGroupsListEndpointsRequest", + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71401,20 +81361,21 @@ class ListNetworkAttachmentsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.List. See the - method description for details. +class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for + RegionNetworkEndpointGroups.ListNetworkEndpoints. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71426,42 +81387,69 @@ class ListNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71473,16 +81461,25 @@ class ListNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71494,20 +81491,21 @@ class ListNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + The name of theregion + where the network endpoint group is located. It + should comply with RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. """ filter: str = proto.Field( @@ -71520,6 +81518,10 @@ class ListNetworkEndpointGroupsRequest(proto.Message): number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71534,21 +81536,20 @@ class ListNetworkEndpointGroupsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for - GlobalNetworkEndpointGroups.ListNetworkEndpoints. See the method - description for details. +class ListNetworkFirewallPoliciesRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71560,42 +81561,69 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71607,21 +81635,20 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71636,10 +81663,11 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71655,10 +81683,6 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71680,9 +81704,8 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): ) -class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for - NetworkEndpointGroups.ListNetworkEndpoints. See the method +class ListNetworkProfilesRequest(proto.Message): + r"""A request message for NetworkProfiles.List. See the method description for details. @@ -71695,42 +81718,69 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71742,23 +81792,20 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. - network_endpoint_groups_list_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsListEndpointsRequest): - The body resource for this request order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71773,17 +81820,14 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. """ filter: str = proto.Field( @@ -71796,15 +81840,6 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - network_endpoint_groups_list_endpoints_request_resource: "NetworkEndpointGroupsListEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=59493390, - message="NetworkEndpointGroupsListEndpointsRequest", - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71824,15 +81859,10 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for - RegionNetworkEndpointGroups.ListNetworkEndpoints. See the method +class ListNetworksRequest(proto.Message): + r"""A request message for Networks.List. See the method description for details. @@ -71845,42 +81875,69 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71892,21 +81949,20 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71918,17 +81974,14 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71944,10 +81997,6 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71962,10 +82011,6 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -71973,9 +82018,9 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): ) -class ListNetworkFirewallPoliciesRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.List. See the - method description for details. +class ListNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71987,42 +82032,69 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72037,13 +82109,17 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72058,13 +82134,16 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -72096,10 +82175,14 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListNetworkProfilesRequest(proto.Message): - r"""A request message for NetworkProfiles.List. See the method +class ListNodeTemplatesRequest(proto.Message): + r"""A request message for NodeTemplates.List. See the method description for details. @@ -72112,42 +82195,69 @@ class ListNetworkProfilesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72162,13 +82272,17 @@ class ListNetworkProfilesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72180,13 +82294,16 @@ class ListNetworkProfilesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + The name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72216,6 +82333,10 @@ class ListNetworkProfilesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -72223,8 +82344,8 @@ class ListNetworkProfilesRequest(proto.Message): ) -class ListNetworksRequest(proto.Message): - r"""A request message for Networks.List. See the method +class ListNodeTypesRequest(proto.Message): + r"""A request message for NodeTypes.List. See the method description for details. @@ -72237,42 +82358,69 @@ class ListNetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72287,13 +82435,17 @@ class ListNetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72308,13 +82460,16 @@ class ListNetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -72346,10 +82501,14 @@ class ListNetworksRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.List. See the method +class ListNodesNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.ListNodes. See the method description for details. @@ -72362,42 +82521,69 @@ class ListNodeGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72409,16 +82595,23 @@ class ListNodeGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + node_group (str): + Name of the NodeGroup resource whose nodes + you want to list. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72433,10 +82626,11 @@ class ListNodeGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72454,6 +82648,10 @@ class ListNodeGroupsRequest(proto.Message): number=54715419, optional=True, ) + node_group: str = proto.Field( + proto.STRING, + number=469958146, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -72479,9 +82677,9 @@ class ListNodeGroupsRequest(proto.Message): ) -class ListNodeTemplatesRequest(proto.Message): - r"""A request message for NodeTemplates.List. See the method - description for details. +class ListOrganizationSecurityPoliciesRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -72493,42 +82691,69 @@ class ListNodeTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72543,13 +82768,17 @@ class ListNodeTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72559,17 +82788,18 @@ class ListNodeTemplatesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72595,13 +82825,10 @@ class ListNodeTemplatesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=138946292, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -72610,8 +82837,8 @@ class ListNodeTemplatesRequest(proto.Message): ) -class ListNodeTypesRequest(proto.Message): - r"""A request message for NodeTypes.List. See the method +class ListPacketMirroringsRequest(proto.Message): + r"""A request message for PacketMirrorings.List. See the method description for details. @@ -72624,42 +82851,69 @@ class ListNodeTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72674,13 +82928,17 @@ class ListNodeTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72692,18 +82950,19 @@ class ListNodeTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -72730,67 +82989,100 @@ class ListNodeTypesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListNodesNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.ListNodes. See the method - description for details. +class ListPeeringRoutesNetworksRequest(proto.Message): + r"""A request message for Networks.ListPeeringRoutes. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + direction (str): + The direction of the exchanged routes. + Check the Direction enum for the list of + possible values. + + This field is a member of `oneof`_ ``_direction``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72802,19 +83094,22 @@ class ListNodesNodeGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - node_group (str): - Name of the NodeGroup resource whose nodes - you want to list. + network (str): + Name of the network for this request. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72824,22 +83119,53 @@ class ListNodesNodeGroupsRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. + peering_name (str): + The response will show routes exchanged over + the given peering connection. + + This field is a member of `oneof`_ ``_peering_name``. project (str): Project ID for this request. + region (str): + The region of the request. The response will + include all subnet routes, static routes and + dynamic routes in the region. + + This field is a member of `oneof`_ ``_region``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ + class Direction(proto.Enum): + r"""The direction of the exchanged routes. + + Values: + UNDEFINED_DIRECTION (0): + A value indicating that the enum field is not + set. + INCOMING (338552870): + For routes exported from peer network. + OUTGOING (307438444): + For routes exported from local network. + """ + UNDEFINED_DIRECTION = 0 + INCOMING = 338552870 + OUTGOING = 307438444 + + direction: str = proto.Field( + proto.STRING, + number=111150975, + optional=True, + ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -72850,9 +83176,9 @@ class ListNodesNodeGroupsRequest(proto.Message): number=54715419, optional=True, ) - node_group: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=469958146, + number=232872494, ) order_by: str = proto.Field( proto.STRING, @@ -72864,24 +83190,31 @@ class ListNodesNodeGroupsRequest(proto.Message): number=19994697, optional=True, ) + peering_name: str = proto.Field( + proto.STRING, + number=249571370, + optional=True, + ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListOrganizationSecurityPoliciesRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.List. See - the method description for details. +class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.ListPerInstanceConfigs. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -72893,44 +83226,74 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It + should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -72943,13 +83306,17 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72959,20 +83326,23 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ filter: str = proto.Field( @@ -72980,6 +83350,10 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -72995,21 +83369,25 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListPacketMirroringsRequest(proto.Message): - r"""A request message for PacketMirrorings.List. See the method - description for details. +class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ListPerInstanceConfigs. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73021,44 +83399,74 @@ class ListPacketMirroringsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It + should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73071,13 +83479,17 @@ class ListPacketMirroringsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73090,14 +83502,16 @@ class ListPacketMirroringsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request, + should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73108,6 +83522,10 @@ class ListPacketMirroringsRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73138,62 +83556,84 @@ class ListPacketMirroringsRequest(proto.Message): ) -class ListPeeringRoutesNetworksRequest(proto.Message): - r"""A request message for Networks.ListPeeringRoutes. See the - method description for details. +class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.ListPreconfiguredExpressionSets. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - direction (str): - The direction of the exchanged routes. - Check the Direction enum for the list of - possible values. - - This field is a member of `oneof`_ ``_direction``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73205,18 +83645,20 @@ class ListPeeringRoutesNetworksRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network (str): - Name of the network for this request. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73226,52 +83668,23 @@ class ListPeeringRoutesNetworksRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - peering_name (str): - The response will show routes exchanged over - the given peering connection. - - This field is a member of `oneof`_ ``_peering_name``. - project (str): - Project ID for this request. - region (str): - The region of the request. The response will - include all subnet routes, static routes and - dynamic routes in the region. + parent_id (str): + Parent ID for this request. - This field is a member of `oneof`_ ``_region``. + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. """ - class Direction(proto.Enum): - r"""The direction of the exchanged routes. - - Values: - UNDEFINED_DIRECTION (0): - A value indicating that the enum field is not - set. - INCOMING (338552870): - For routes exported from peer network. - OUTGOING (307438444): - For routes exported from local network. - """ - UNDEFINED_DIRECTION = 0 - INCOMING = 338552870 - OUTGOING = 307438444 - - direction: str = proto.Field( - proto.STRING, - number=111150975, - optional=True, - ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -73282,10 +83695,6 @@ class Direction(proto.Enum): number=54715419, optional=True, ) - network: str = proto.Field( - proto.STRING, - number=232872494, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -73296,18 +83705,9 @@ class Direction(proto.Enum): number=19994697, optional=True, ) - peering_name: str = proto.Field( - proto.STRING, - number=249571370, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=138946292, + number=459714768, optional=True, ) return_partial_success: bool = proto.Field( @@ -73317,9 +83717,9 @@ class Direction(proto.Enum): ) -class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): +class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): r"""A request message for - InstanceGroupManagers.ListPerInstanceConfigs. See the method + SecurityPolicies.ListPreconfiguredExpressionSets. See the method description for details. @@ -73332,47 +83732,71 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73385,13 +83809,17 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73406,17 +83834,14 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. """ filter: str = proto.Field( @@ -73424,10 +83849,6 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73452,16 +83873,11 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ListPerInstanceConfigs. See the - method description for details. +class ListPreviewFeaturesRequest(proto.Message): + r"""A request message for PreviewFeatures.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73473,47 +83889,71 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73526,13 +83966,17 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73544,16 +83988,14 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request, - should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73564,10 +84006,6 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73587,10 +84025,6 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -73598,10 +84032,9 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): ) -class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.ListPreconfiguredExpressionSets. - See the method description for details. +class ListPublicAdvertisedPrefixesRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73613,42 +84046,69 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73663,13 +84123,17 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73679,17 +84143,16 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73715,10 +84178,9 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -73727,10 +84189,9 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M ) -class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): - r"""A request message for - SecurityPolicies.ListPreconfiguredExpressionSets. See the method - description for details. +class ListPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73742,42 +84203,69 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73792,13 +84280,17 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73810,13 +84302,16 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73846,6 +84341,10 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -73853,8 +84352,8 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): ) -class ListPreviewFeaturesRequest(proto.Message): - r"""A request message for PreviewFeatures.List. See the method +class ListReferrersInstancesRequest(proto.Message): + r"""A request message for Instances.ListReferrers. See the method description for details. @@ -73867,44 +84366,75 @@ class ListPreviewFeaturesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance (str): + Name of the target instance scoping this + request, or '-' if the request should span over + all instances in the container. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73917,13 +84447,17 @@ class ListPreviewFeaturesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73938,13 +84472,16 @@ class ListPreviewFeaturesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -73952,6 +84489,10 @@ class ListPreviewFeaturesRequest(proto.Message): number=336120696, optional=True, ) + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73976,11 +84517,15 @@ class ListPreviewFeaturesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListPublicAdvertisedPrefixesRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.List. See the - method description for details. +class ListRegionAutoscalersRequest(proto.Message): + r"""A request message for RegionAutoscalers.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73992,42 +84537,69 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74042,13 +84614,17 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74060,13 +84636,16 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74096,6 +84675,10 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -74103,8 +84686,8 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): ) -class ListPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.List. See the +class ListRegionBackendBucketsRequest(proto.Message): + r"""A request message for RegionBackendBuckets.List. See the method description for details. @@ -74117,42 +84700,69 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74167,13 +84777,17 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74190,10 +84804,11 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74234,9 +84849,9 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): ) -class ListReferrersInstancesRequest(proto.Message): - r"""A request message for Instances.ListReferrers. See the method - description for details. +class ListRegionBackendServicesRequest(proto.Message): + r"""A request message for RegionBackendServices.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74248,181 +84863,69 @@ class ListReferrersInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + mixed in one request. - This field is a member of `oneof`_ ``_filter``. - instance (str): - Name of the target instance scoping this - request, or '-' if the request should span over - all instances in the container. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) - - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListRegionAutoscalersRequest(proto.Message): - r"""A request message for RegionAutoscalers.List. See the method - description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74437,13 +84940,17 @@ class ListRegionAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74460,10 +84967,11 @@ class ListRegionAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74504,9 +85012,9 @@ class ListRegionAutoscalersRequest(proto.Message): ) -class ListRegionBackendServicesRequest(proto.Message): - r"""A request message for RegionBackendServices.List. See the - method description for details. +class ListRegionCommitmentsRequest(proto.Message): + r"""A request message for RegionCommitments.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74518,42 +85026,69 @@ class ListRegionBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74568,13 +85103,17 @@ class ListRegionBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74587,14 +85126,15 @@ class ListRegionBackendServicesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74635,9 +85175,9 @@ class ListRegionBackendServicesRequest(proto.Message): ) -class ListRegionCommitmentsRequest(proto.Message): - r"""A request message for RegionCommitments.List. See the method - description for details. +class ListRegionCompositeHealthChecksRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74649,42 +85189,69 @@ class ListRegionCommitmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74699,13 +85266,17 @@ class ListRegionCommitmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74718,14 +85289,15 @@ class ListRegionCommitmentsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74780,42 +85352,69 @@ class ListRegionDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74830,13 +85429,17 @@ class ListRegionDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74853,10 +85456,11 @@ class ListRegionDiskTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74911,42 +85515,69 @@ class ListRegionDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74961,13 +85592,17 @@ class ListRegionDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74984,10 +85619,174 @@ class ListRegionDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + + +class ListRegionHealthAggregationPoliciesRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.List. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75042,42 +85841,69 @@ class ListRegionHealthCheckServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75092,13 +85918,17 @@ class ListRegionHealthCheckServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75115,10 +85945,11 @@ class ListRegionHealthCheckServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75173,42 +86004,69 @@ class ListRegionHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75223,13 +86081,17 @@ class ListRegionHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75246,10 +86108,11 @@ class ListRegionHealthChecksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75304,42 +86167,69 @@ class ListRegionHealthSourcesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75354,13 +86244,17 @@ class ListRegionHealthSourcesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75377,10 +86271,11 @@ class ListRegionHealthSourcesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75436,42 +86331,69 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. instance_group_manager (str): @@ -75489,13 +86411,17 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75508,15 +86434,17 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. Name - should conform to RFC1035. + Name of the region + scoping this request. Name should conform to + RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75575,42 +86503,69 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75625,13 +86580,17 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75648,10 +86607,11 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75706,42 +86666,69 @@ class ListRegionInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75756,13 +86743,17 @@ class ListRegionInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75779,10 +86770,11 @@ class ListRegionInstanceGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75837,42 +86829,69 @@ class ListRegionInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75887,13 +86906,17 @@ class ListRegionInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75910,10 +86933,11 @@ class ListRegionInstanceTemplatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75999,42 +87023,69 @@ class ListRegionInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76049,13 +87100,17 @@ class ListRegionInstantSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76072,10 +87127,11 @@ class ListRegionInstantSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76130,42 +87186,69 @@ class ListRegionMultiMigsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76180,13 +87263,17 @@ class ListRegionMultiMigsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76203,10 +87290,11 @@ class ListRegionMultiMigsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76261,42 +87349,69 @@ class ListRegionNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76311,13 +87426,17 @@ class ListRegionNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76330,16 +87449,17 @@ class ListRegionNetworkEndpointGroupsRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. + The name of theregion + where the network endpoint group is located. It + should comply with RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76394,42 +87514,69 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76444,13 +87591,17 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76467,10 +87618,11 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76525,42 +87677,69 @@ class ListRegionNetworkPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76575,13 +87754,17 @@ class ListRegionNetworkPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76598,10 +87781,11 @@ class ListRegionNetworkPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76656,42 +87840,69 @@ class ListRegionNotificationEndpointsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76706,13 +87917,17 @@ class ListRegionNotificationEndpointsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76729,10 +87944,11 @@ class ListRegionNotificationEndpointsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76787,42 +88003,69 @@ class ListRegionOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76837,13 +88080,17 @@ class ListRegionOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76860,10 +88107,11 @@ class ListRegionOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76918,42 +88166,69 @@ class ListRegionSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76968,13 +88243,17 @@ class ListRegionSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76991,10 +88270,11 @@ class ListRegionSecurityPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77049,42 +88329,69 @@ class ListRegionSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77099,13 +88406,17 @@ class ListRegionSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77122,10 +88433,11 @@ class ListRegionSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77180,42 +88492,69 @@ class ListRegionSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77230,13 +88569,17 @@ class ListRegionSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77253,10 +88596,11 @@ class ListRegionSslCertificatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77311,42 +88655,69 @@ class ListRegionSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77361,13 +88732,17 @@ class ListRegionSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77384,10 +88759,11 @@ class ListRegionSslPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77442,42 +88818,69 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77492,13 +88895,17 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77515,10 +88922,11 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77573,42 +88981,69 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77623,13 +89058,17 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77646,10 +89085,11 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77704,42 +89144,69 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77754,13 +89221,17 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77777,10 +89248,11 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77835,42 +89307,69 @@ class ListRegionUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77885,13 +89384,17 @@ class ListRegionUrlMapsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77908,10 +89411,11 @@ class ListRegionUrlMapsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77966,42 +89470,69 @@ class ListRegionZonesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78016,13 +89547,17 @@ class ListRegionZonesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78039,10 +89574,11 @@ class ListRegionZonesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78097,42 +89633,69 @@ class ListRegionsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78147,13 +89710,17 @@ class ListRegionsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78168,10 +89735,11 @@ class ListRegionsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78222,42 +89790,69 @@ class ListReservationBlocksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78272,13 +89867,17 @@ class ListReservationBlocksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78291,15 +89890,17 @@ class ListReservationBlocksRequest(proto.Message): project (str): Project ID for this request. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78361,42 +89962,69 @@ class ListReservationSubBlocksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78411,13 +90039,17 @@ class ListReservationSubBlocksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78436,10 +90068,11 @@ class ListReservationSubBlocksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78501,42 +90134,69 @@ class ListReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78551,13 +90211,17 @@ class ListReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78572,10 +90236,11 @@ class ListReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78632,42 +90297,69 @@ class ListResourcePoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78682,13 +90374,17 @@ class ListResourcePoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78705,10 +90401,11 @@ class ListResourcePoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78763,42 +90460,69 @@ class ListRoutePoliciesRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78813,13 +90537,17 @@ class ListRoutePoliciesRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78836,10 +90564,11 @@ class ListRoutePoliciesRoutersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78901,42 +90630,69 @@ class ListRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78951,13 +90707,17 @@ class ListRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78974,10 +90734,11 @@ class ListRoutersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79032,42 +90793,69 @@ class ListRoutesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79082,13 +90870,17 @@ class ListRoutesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79103,10 +90895,11 @@ class ListRoutesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79157,42 +90950,69 @@ class ListSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79207,13 +91027,17 @@ class ListSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79228,10 +91052,11 @@ class ListSecurityPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79282,42 +91107,69 @@ class ListServiceAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79332,13 +91184,17 @@ class ListServiceAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79355,10 +91211,11 @@ class ListServiceAttachmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79413,42 +91270,69 @@ class ListSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79463,13 +91347,17 @@ class ListSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79484,10 +91372,11 @@ class ListSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79538,42 +91427,69 @@ class ListSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79588,13 +91504,17 @@ class ListSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79609,10 +91529,11 @@ class ListSslCertificatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79663,42 +91584,69 @@ class ListSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79713,13 +91661,17 @@ class ListSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79734,10 +91686,11 @@ class ListSslPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79788,42 +91741,69 @@ class ListStoragePoolTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79838,13 +91818,17 @@ class ListStoragePoolTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79859,10 +91843,11 @@ class ListStoragePoolTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79919,42 +91904,69 @@ class ListStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79969,13 +91981,17 @@ class ListStoragePoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79990,10 +92006,11 @@ class ListStoragePoolsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80050,42 +92067,69 @@ class ListSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80100,13 +92144,17 @@ class ListSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80123,26 +92171,36 @@ class ListSubnetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. views (str): Defines the extra views returned back in the subnetwork - resource. Supported values: - WITH_UTILIZATION: Utilization - data is included in the response. Check the Views enum for - the list of possible values. + resource. Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Check the Views enum for the list of possible values. This field is a member of `oneof`_ ``_views``. """ class Views(proto.Enum): r"""Defines the extra views returned back in the subnetwork resource. - Supported values: - WITH_UTILIZATION: Utilization data is included - in the response. + Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. Values: UNDEFINED_VIEWS (0): @@ -80211,42 +92269,69 @@ class ListTargetGrpcProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80261,13 +92346,17 @@ class ListTargetGrpcProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80282,10 +92371,11 @@ class ListTargetGrpcProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80336,42 +92426,69 @@ class ListTargetHttpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80386,13 +92503,17 @@ class ListTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80407,10 +92528,11 @@ class ListTargetHttpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80461,42 +92583,69 @@ class ListTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80511,13 +92660,17 @@ class ListTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80532,10 +92685,11 @@ class ListTargetHttpsProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80586,42 +92740,69 @@ class ListTargetInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80636,13 +92817,17 @@ class ListTargetInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80657,10 +92842,11 @@ class ListTargetInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80717,42 +92903,69 @@ class ListTargetPoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80767,13 +92980,17 @@ class ListTargetPoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80790,10 +93007,11 @@ class ListTargetPoolsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80848,42 +93066,69 @@ class ListTargetSslProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80898,13 +93143,17 @@ class ListTargetSslProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80919,10 +93168,11 @@ class ListTargetSslProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80973,42 +93223,69 @@ class ListTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81023,13 +93300,17 @@ class ListTargetTcpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81044,10 +93325,11 @@ class ListTargetTcpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81098,42 +93380,69 @@ class ListTargetVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81148,13 +93457,17 @@ class ListTargetVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81171,10 +93484,11 @@ class ListTargetVpnGatewaysRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81229,42 +93543,69 @@ class ListUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81279,13 +93620,17 @@ class ListUrlMapsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81300,10 +93645,11 @@ class ListUrlMapsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81354,42 +93700,69 @@ class ListUsableBackendBucketsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81404,13 +93777,17 @@ class ListUsableBackendBucketsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81425,10 +93802,11 @@ class ListUsableBackendBucketsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81479,42 +93857,226 @@ class ListUsableBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + + +class ListUsableRegionBackendBucketsRequest(proto.Message): + r"""A request message for RegionBackendBuckets.ListUsable. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81529,13 +94091,17 @@ class ListUsableBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81547,13 +94113,18 @@ class ListUsableBackendServicesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81583,6 +94154,10 @@ class ListUsableBackendServicesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -81604,42 +94179,69 @@ class ListUsableRegionBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81654,13 +94256,17 @@ class ListUsableRegionBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81673,16 +94279,17 @@ class ListUsableRegionBackendServicesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. It - must be a string that meets the requirements in - RFC1035. + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81737,42 +94344,69 @@ class ListUsableSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81787,13 +94421,17 @@ class ListUsableSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81808,10 +94446,11 @@ class ListUsableSubnetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81874,42 +94513,69 @@ class ListVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81924,13 +94590,17 @@ class ListVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81947,10 +94617,11 @@ class ListVpnGatewaysRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82005,42 +94676,69 @@ class ListVpnTunnelsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82055,13 +94753,17 @@ class ListVpnTunnelsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82078,10 +94780,11 @@ class ListVpnTunnelsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82138,42 +94841,69 @@ class ListWireGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82188,13 +94918,17 @@ class ListWireGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82209,10 +94943,11 @@ class ListWireGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82267,42 +95002,69 @@ class ListXpnHostsProjectsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82317,13 +95079,17 @@ class ListXpnHostsProjectsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82340,10 +95106,11 @@ class ListXpnHostsProjectsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82401,42 +95168,69 @@ class ListZoneOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82451,13 +95245,17 @@ class ListZoneOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82472,10 +95270,11 @@ class ListZoneOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82518,6 +95317,169 @@ class ListZoneOperationsRequest(proto.Message): ) +class ListZoneVmExtensionPoliciesRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.List. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class ListZonesRequest(proto.Message): r"""A request message for Zones.List. See the method description for details. @@ -82532,42 +95494,69 @@ class ListZonesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82582,13 +95571,17 @@ class ListZonesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82603,10 +95596,11 @@ class ListZonesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82801,14 +95795,14 @@ class LocationPolicyLocation(proto.Message): This field is a member of `oneof`_ ``_constraints``. preference (str): Preference for a given location. Set to - either ALLOW or DENY. Check the Preference enum + either ALLOW orDENY. Check the Preference enum for the list of possible values. This field is a member of `oneof`_ ``_preference``. """ class Preference(proto.Enum): - r"""Preference for a given location. Set to either ALLOW or DENY. + r"""Preference for a given location. Set to either ALLOW orDENY. Values: UNDEFINED_PREFERENCE (0): @@ -82861,11 +95855,12 @@ class LocationPolicyLocationConstraints(proto.Message): class MachineImage(proto.Message): - r"""Represents a machine image resource. A machine image is a - Compute Engine resource that stores all the configuration, - metadata, permissions, and data from one or more disks required - to create a Virtual machine (VM) instance. For more information, - see Machine images. + r"""Represents a machine image resource. + + A machine image is a Compute Engine resource that stores all the + configuration, metadata, permissions, and data from one or more + disks required to create a Virtual machine (VM) instance. For + more information, seeMachine images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -82873,7 +95868,7 @@ class MachineImage(proto.Message): Attributes: creation_timestamp (str): [Output Only] The creation timestamp for this machine image - in RFC3339 text format. + inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -82898,8 +95893,8 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_instance_properties``. kind (str): - [Output Only] The resource type, which is always - compute#machineImage for machine image. + [Output Only] The resource type, which is + alwayscompute#machineImage for machine image. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -82910,36 +95905,40 @@ class MachineImage(proto.Message): Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order - to update or change labels. To see the latest - fingerprint, make get() request to the machine - image. + to update or change labels. + + To see the latest fingerprint, make get() + request to the machine image. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this machine image. These can be later modified by the setLabels method. machine_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the machine image using a - customer-supplied encryption key. After you - encrypt a machine image using a + Encrypts the machine image using + acustomer-supplied encryption key. + + After you encrypt a machine image using a customer-supplied key, you must provide the same key if you use the machine image later. For example, you must provide the encryption key when you create an instance from the encrypted machine image in a future request. + Customer-supplied encryption keys do not protect - access to metadata of the machine image. If you - do not provide an encryption key when creating - the machine image, then the machine image will - be encrypted using an automatically generated - key and you do not need to provide a key to use - the machine image later. + access to metadata of the machine image. + + If you do not provide an encryption key when + creating the machine image, then the machine + image will be encrypted using an automatically + generated key and you do not need to provide a + key to use the machine image later. This field is a member of `oneof`_ ``_machine_image_encryption_key``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -82964,7 +95963,7 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_self_link``. source_disk_encryption_keys (MutableSequence[google.cloud.compute_v1beta.types.SourceDiskEncryptionKey]): - [Input Only] The customer-supplied encryption key of the + [Input Only] Thecustomer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key. @@ -82972,10 +95971,13 @@ class MachineImage(proto.Message): The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance This field is a member of `oneof`_ ``_source_instance``. source_instance_properties (google.cloud.compute_v1beta.types.SourceInstanceProperties): @@ -82986,14 +95988,14 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_source_instance_properties``. status (str): [Output Only] The status of the machine image. One of the - following values: INVALID, CREATING, READY, DELETING, and + following values:INVALID, CREATING, READY,DELETING, and UPLOADING. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. storage_locations (MutableSequence[str]): The regional or multi-regional Cloud Storage - bucket location where the machine image is + bucket location where themachine image is stored. total_storage_bytes (int): [Output Only] Total size of the storage used by the machine @@ -83004,7 +96006,7 @@ class MachineImage(proto.Message): class Status(proto.Enum): r"""[Output Only] The status of the machine image. One of the following - values: INVALID, CREATING, READY, DELETING, and UPLOADING. + values:INVALID, CREATING, READY,DELETING, and UPLOADING. Values: UNDEFINED_STATUS (0): @@ -83148,14 +96150,15 @@ class MachineImageList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.MachineImage]): A list of MachineImage resources. kind (str): - [Output Only] The resource type, which is always - compute#machineImagesListResponse for machine image lists. + [Output Only] The resource type, which is + alwayscompute#machineImagesListResponse for machine image + lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -83209,9 +96212,11 @@ def raw_page(self): class MachineType(proto.Message): - r"""Represents a Machine Type resource. You can use specific - machine types for your VM instances based on performance and - pricing requirements. For more information, read Machine Types. + r"""Represents a Machine Type resource. + + You can use specific machine types for your VM instances based + on performance and pricing requirements. For more information, + readMachine Types. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -83231,7 +96236,7 @@ class MachineType(proto.Message): This field is a member of `oneof`_ ``_bundled_local_ssds``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -83260,12 +96265,12 @@ class MachineType(proto.Message): This field is a member of `oneof`_ ``_image_space_gb``. is_shared_cpu (bool): [Output Only] Whether this machine type has a shared CPU. - See Shared-core machine types for more information. + SeeShared-core machine types for more information. This field is a member of `oneof`_ ``_is_shared_cpu``. kind (str): - [Output Only] The type of the resource. Always - compute#machineType for machine types. + [Output Only] The type of the resource. + Alwayscompute#machineType for machine types. This field is a member of `oneof`_ ``_kind``. maximum_persistent_disks (int): @@ -83420,15 +96425,15 @@ class MachineTypeAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.MachineTypesScopedList]): A list of MachineTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#machineTypeAggregatedList for aggregated lists of - machine types. + [Output Only] Type of resource. + Alwayscompute#machineTypeAggregatedList for aggregated lists + of machine types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -83509,7 +96514,7 @@ class MachineTypeList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -83604,30 +96609,36 @@ class ManagedInstance(proto.Message): This field is a member of `oneof`_ ``_all_instances_config``. current_action (str): [Output Only] The current action that the managed instance - group has scheduled for the instance. Possible values: - - NONE The instance is running, and the managed instance group - does not have any scheduled actions for this instance. - - CREATING The managed instance group is creating this - instance. If the group fails to create this instance, it - will try again until it is successful. - - CREATING_WITHOUT_RETRIES The managed instance group is - attempting to create this instance only once. If the group - fails to create this instance, it does not try again and the - group's targetSize value is decreased instead. - RECREATING - The managed instance group is recreating this instance. - - DELETING The managed instance group is permanently deleting - this instance. - ABANDONING The managed instance group is - abandoning this instance. The instance will be removed from - the instance group and from any target pools that are - associated with this group. - RESTARTING The managed - instance group is restarting the instance. - REFRESHING The - managed instance group is applying configuration changes to - the instance without stopping it. For example, the group can - update the target pool list for an instance without stopping - that instance. - VERIFYING The managed instance group has - created the instance and it is in the process of being - verified. Check the CurrentAction enum for the list of - possible values. + group has scheduled for the instance. Possible values: + + :: + + - NONE The instance is running, and the managed + instance group does not have any scheduled actions for this instance. + - CREATING The managed instance group is creating this + instance. If the group fails to create this instance, it will try again + until it is successful. + - CREATING_WITHOUT_RETRIES The managed instance group + is attempting to create this instance only once. If the group fails + to create this instance, it does not try again and the group'stargetSize value is decreased instead. + - RECREATING The managed instance group is recreating + this instance. + - DELETING The managed instance group is permanently + deleting this instance. + - ABANDONING The managed instance group is abandoning + this instance. The instance will be removed from the instance group + and from any target pools that are associated with this group. + - RESTARTING The managed instance group is restarting + the instance. + - REFRESHING The managed instance group is applying + configuration changes to the instance without stopping it. For example, + the group can update the target pool list for an instance without + stopping that instance. + - VERIFYING The managed instance group has created the + instance and it is in the process of being verified. + + Check the CurrentAction enum for the list of possible + values. This field is a member of `oneof`_ ``_current_action``. id (int): @@ -83693,27 +96704,36 @@ class ManagedInstance(proto.Message): class CurrentAction(proto.Enum): r"""[Output Only] The current action that the managed instance group has - scheduled for the instance. Possible values: - NONE The instance is - running, and the managed instance group does not have any scheduled - actions for this instance. - CREATING The managed instance group is - creating this instance. If the group fails to create this instance, - it will try again until it is successful. - CREATING_WITHOUT_RETRIES - The managed instance group is attempting to create this instance - only once. If the group fails to create this instance, it does not - try again and the group's targetSize value is decreased instead. - - RECREATING The managed instance group is recreating this instance. - - DELETING The managed instance group is permanently deleting this - instance. - ABANDONING The managed instance group is abandoning this - instance. The instance will be removed from the instance group and - from any target pools that are associated with this group. - - RESTARTING The managed instance group is restarting the instance. - - REFRESHING The managed instance group is applying configuration - changes to the instance without stopping it. For example, the group - can update the target pool list for an instance without stopping - that instance. - VERIFYING The managed instance group has created - the instance and it is in the process of being verified. Additional - supported values which may be not listed in the enum directly due to - technical reasons: STOPPING SUSPENDING + scheduled for the instance. Possible values: + + :: + + - NONE The instance is running, and the managed + instance group does not have any scheduled actions for this instance. + - CREATING The managed instance group is creating this + instance. If the group fails to create this instance, it will try again + until it is successful. + - CREATING_WITHOUT_RETRIES The managed instance group + is attempting to create this instance only once. If the group fails + to create this instance, it does not try again and the group'stargetSize value is decreased instead. + - RECREATING The managed instance group is recreating + this instance. + - DELETING The managed instance group is permanently + deleting this instance. + - ABANDONING The managed instance group is abandoning + this instance. The instance will be removed from the instance group + and from any target pools that are associated with this group. + - RESTARTING The managed instance group is restarting + the instance. + - REFRESHING The managed instance group is applying + configuration changes to the instance without stopping it. For example, + the group can update the target pool list for an instance without + stopping that instance. + - VERIFYING The managed instance group has created the + instance and it is in the process of being verified. + + Additional supported values which may be not listed in the enum + directly due to technical reasons: STOPPING SUSPENDING Values: UNDEFINED_CURRENT_ACTION (0): @@ -83763,14 +96783,16 @@ class CurrentAction(proto.Enum): The managed instance group is verifying this already created instance. Verification happens every time the instance is (re)created or - restarted and consists of: 1. Waiting until - health check specified as part of this managed - instance group's autohealing policy reports - HEALTHY. Note: Applies only if autohealing - policy has a health check specified 2. Waiting - for addition verification steps performed as - post-instance creation (subject to future - extensions). + restarted and consists of: + + 1. Waiting until health check specified as part + of this managed instance group's + autohealing policy reports HEALTHY. + Note: Applies only if autohealing policy has + a health check specified + 2. Waiting for addition verification steps + performed as post-instance creation + (subject to future extensions). """ UNDEFINED_CURRENT_ACTION = 0 ABANDONING = 388244813 @@ -84192,9 +97214,10 @@ class Metadata(proto.Message): or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve the resource. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve the resource. This field is a member of `oneof`_ ``_fingerprint``. items (MutableSequence[google.cloud.compute_v1beta.types.Items]): @@ -84230,15 +97253,19 @@ class MetadataFilter(proto.Message): and sidecars involved in load balancing would typically present metadata to the load balancers that need to match criteria specified here. If a match takes place, the relevant configuration is made - available to those proxies. For each metadataFilter in this list, if - its filterMatchCriteria is set to MATCH_ANY, at least one of the - filterLabels must match the corresponding label provided in the - metadata. If its filterMatchCriteria is set to MATCH_ALL, then all - of its filterLabels must match with corresponding labels provided in - the metadata. An example for using metadataFilters would be: if load - balancing involves Envoys, they receive routing configuration when - values in metadataFilters match values supplied in of their XDS - requests to loadbalancers. + available to those proxies. + + For each metadataFilter in this list, if itsfilterMatchCriteria is + set to MATCH_ANY, at least one of thefilterLabels must match the + corresponding label provided in the metadata. If its + filterMatchCriteria is set to MATCH_ALL, then all of its + filterLabels must match with corresponding labels provided in the + metadata. + + An example for using metadataFilters would be: if load balancing + involves Envoys, they receive routing configuration when values + inmetadataFilters match values supplied in of their XDS requests to + loadbalancers. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -84247,16 +97274,26 @@ class MetadataFilter(proto.Message): filter_labels (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilterLabelMatch]): The list of label value pairs that must match labels in the provided metadata based on - filterMatchCriteria This list must not be empty - and can have at the most 64 entries. + filterMatchCriteria + + This list must not be empty and can have at the + most 64 entries. filter_match_criteria (str): Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall - metadataFilter match. Supported values are: - MATCH_ANY: at - least one of the filterLabels must have a matching label in - the provided metadata. - MATCH_ALL: all filterLabels must - have matching labels in the provided metadata. Check the - FilterMatchCriteria enum for the list of possible values. + metadataFilter match. + + Supported values are: + + :: + + - MATCH_ANY: at least one of the filterLabels + must have a matching label in the provided metadata. + - MATCH_ALL: all filterLabels must have + matching labels in the provided metadata. + + Check the FilterMatchCriteria enum for the list of possible + values. This field is a member of `oneof`_ ``_filter_match_criteria``. """ @@ -84264,10 +97301,16 @@ class MetadataFilter(proto.Message): class FilterMatchCriteria(proto.Enum): r"""Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter - match. Supported values are: - MATCH_ANY: at least one of the - filterLabels must have a matching label in the provided metadata. - - MATCH_ALL: all filterLabels must have matching labels in the - provided metadata. + match. + + Supported values are: + + :: + + - MATCH_ANY: at least one of the filterLabels + must have a matching label in the provided metadata. + - MATCH_ALL: all filterLabels must have + matching labels in the provided metadata. Values: UNDEFINED_FILTER_MATCH_CRITERIA (0): @@ -84275,13 +97318,13 @@ class FilterMatchCriteria(proto.Enum): set. MATCH_ALL (180663271): Specifies that all filterLabels must match - for the metadataFilter to be considered a match. + for themetadataFilter to be considered a match. MATCH_ANY (180663346): Specifies that any filterLabel must match for - the metadataFilter to be considered a match. + themetadataFilter to be considered a match. NOT_SET (163646646): Indicates that the match criteria was not - set. A metadataFilter must never be created with + set. AmetadataFilter must never be created with this value. """ UNDEFINED_FILTER_MATCH_CRITERIA = 0 @@ -84302,8 +97345,8 @@ class FilterMatchCriteria(proto.Enum): class MetadataFilterLabelMatch(proto.Message): - r"""MetadataFilter label name value pairs that are expected to - match corresponding labels presented as metadata to the load + r"""MetadataFilter label name value pairs that are expected + to match corresponding labels presented as metadata to the load balancer. @@ -84311,15 +97354,18 @@ class MetadataFilterLabelMatch(proto.Message): Attributes: name (str): - Name of metadata label. The name can have a - maximum length of 1024 characters and must be at - least 1 character long. + Name of metadata label. + + The name can have a maximum length of 1024 + characters and must be at least 1 character + long. This field is a member of `oneof`_ ``_name``. value (str): The value of the label must match the - specified value. value can have a maximum length - of 1024 characters. + specified value. + value can have a maximum length of 1024 + characters. This field is a member of `oneof`_ ``_value``. """ @@ -84358,17 +97404,21 @@ class MoveAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84414,17 +97464,21 @@ class MoveDiskProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84465,17 +97519,21 @@ class MoveFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84515,17 +97573,21 @@ class MoveGlobalAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84567,17 +97629,21 @@ class MoveInstanceProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84615,17 +97681,21 @@ class MoveOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -84669,14 +97739,14 @@ class MultiMig(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always compute#multiMig + [Output only] Type of the resource. Alwayscompute#multiMig for multi-MIGs. This field is a member of `oneof`_ ``_kind``. name (str): The name of the multi-MIG. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, @@ -84764,11 +97834,15 @@ class MultiMigResourcePolicies(proto.Message): The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a - workload policy: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + workload policy: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + - + projects/project/regions/region/resourcePolicies/resourcePolicy + - + regions/region/resourcePolicies/resourcePolicy This field is a member of `oneof`_ ``_workload_policy``. """ @@ -84927,7 +98001,7 @@ class MultiMigsList(proto.Message): This field is a member of `oneof`_ ``_kind``. next_page_token (str): This token allows you to get the next page of - results for maxResults, use the nextPageToken as + results formaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging @@ -84999,9 +98073,9 @@ class NamedPort(proto.Message): Attributes: name (str): - The name for this named port. The name must - be 1-63 characters long, and comply with - RFC1035. + The name for this named port. + The name must be 1-63 characters long, and + comply withRFC1035. This field is a member of `oneof`_ ``_name``. port (int): @@ -85073,8 +98147,9 @@ class NatIpInfoNatIpInfoMapping(proto.Message): This field is a member of `oneof`_ ``_nat_ip``. usage (str): Specifies whether NAT IP is currently serving - at least one endpoint or not. Check the Usage - enum for the list of possible values. + at least one endpoint or not. + Check the Usage enum for the list of possible + values. This field is a member of `oneof`_ ``_usage``. """ @@ -85145,9 +98220,10 @@ class NatIpInfoResponse(proto.Message): class Network(proto.Message): - r"""Represents a VPC Network resource. Networks connect resources - to each other and to the internet. For more information, read - Virtual Private Cloud (VPC) Network. + r"""Represents a VPC Network resource. + + Networks connect resources to each other and to the internet. + For more information, readVirtual Private Cloud (VPC) Network. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -85156,27 +98232,31 @@ class Network(proto.Message): I_pv4_range (str): Deprecated in favor of subnet mode networks. The range of internal addresses that are legal - on this network. This range is a CIDR - specification, for example: 192.168.0.0/16. + on this network. This range is aCIDR + specification, for example:192.168.0.0/16. Provided by the client when the network is created. This field is a member of `oneof`_ ``_I_pv4_range``. auto_create_subnetworks (bool): Must be set to create a VPC network. If not - set, a legacy network is created. When set to - true, the VPC network is created in auto mode. - When set to false, the VPC network is created in - custom mode. An auto mode VPC network starts - with one subnet per region. Each subnet has a - predetermined range as described in Auto mode - VPC network IP ranges. For custom mode VPC - networks, you can add subnets using the - subnetworks insert method. + set, a legacy network is created. + + When set to true, the VPC network is created in + auto mode. When set to false, the VPC network is + created in custom mode. + + An auto mode VPC network starts with one subnet + per region. Each subnet has a predetermined + range as described inAuto mode VPC network IP + ranges. + + For custom mode VPC networks, you can add + subnets using the subnetworksinsert method. This field is a member of `oneof`_ ``_auto_create_subnetworks``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85223,8 +98303,8 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_kind``. mtu (int): - Maximum Transmission Unit in bytes. The - minimum value for this field is 1300 and the + Maximum Transmission Unit in bytes. + The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo @@ -85235,7 +98315,7 @@ class Network(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -85255,10 +98335,12 @@ class Network(proto.Message): network_profile (str): A full or partial URL of the network profile to apply to this network. This field can be set only at resource - creation time. For example, the following are valid URLs: - - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - - - projects/{project_id}/global/networkProfiles/{network_profile_name} + creation time. For example, the following are valid URLs: + + :: + + - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} + - projects/{project_id}/global/networkProfiles/{network_profile_name} This field is a member of `oneof`_ ``_network_profile``. params (google.cloud.compute_v1beta.types.NetworkParams): @@ -85270,7 +98352,7 @@ class Network(proto.Message): [Output Only] A list of network peerings for the resource. routing_config (google.cloud.compute_v1beta.types.NetworkRoutingConfig): The network-level routing configuration for - this network. Used by Cloud Router to determine + this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. @@ -85411,7 +98493,9 @@ class NetworkFirewallPolicyEnforcementOrder(proto.Enum): class NetworkAttachment(proto.Message): - r"""NetworkAttachments A network attachment resource ... + r"""NetworkAttachments + A network attachment resource ... + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -85425,7 +98509,7 @@ class NetworkAttachment(proto.Message): This field is a member of `oneof`_ ``_connection_preference``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85453,7 +98537,7 @@ class NetworkAttachment(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -85616,7 +98700,7 @@ class NetworkAttachmentAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -85803,7 +98887,7 @@ class NetworkAttachmentList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -85894,7 +98978,7 @@ class NetworkEdgeSecurityService(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85911,9 +98995,10 @@ class NetworkEdgeSecurityService(proto.Message): NetworkEdgeSecurityService. An up-to-date fingerprint must be provided in order to update the NetworkEdgeSecurityService, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a NetworkEdgeSecurityService. This field is a member of `oneof`_ ``_fingerprint``. @@ -85923,15 +99008,15 @@ class NetworkEdgeSecurityService(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#networkEdgeSecurityService for + [Output only] Type of the resource. + Alwayscompute#networkEdgeSecurityService for NetworkEdgeSecurityServices This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -86032,15 +99117,15 @@ class NetworkEdgeSecurityServiceAggregatedList(proto.Message): A list of NetworkEdgeSecurityServicesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkEdgeSecurityServiceAggregatedList for lists - of Network Edge Security Services. + [Output Only] Type of resource. + Alwayscompute#networkEdgeSecurityServiceAggregatedList for + lists of Network Edge Security Services. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -86149,27 +99234,32 @@ class NetworkEndpoint(proto.Message): the network endpoint. client_destination_port (int): Represents the port number to which PSC consumer sends - packets. Optional. Only valid for network endpoint groups - created with GCE_VM_IP_PORTMAP endpoint type. + packets. + + Optional. Only valid for network endpoint groups created + withGCE_VM_IP_PORTMAP endpoint type. This field is a member of `oneof`_ ``_client_destination_port``. fqdn (str): Optional fully qualified domain name of network endpoint. This can only be specified when - NetworkEndpointGroup.network_endpoint_type is - NON_GCP_FQDN_PORT. + NetworkEndpointGroup.network_endpoint_type + isNON_GCP_FQDN_PORT. This field is a member of `oneof`_ ``_fqdn``. instance (str): The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type - GCE_VM_IP and GCE_VM_IP_PORT. The instance must be in the - same zone of network endpoint group (for zonal NEGs) or in - the zone within the region of the NEG (for regional NEGs). - If the ipAddress is specified, it must belongs to the VM - instance. The name must be 1-63 characters long, and comply - with RFC1035 or be a valid URL pointing to an existing + GCE_VM_IP andGCE_VM_IP_PORT. + + The instance must be in the same zone of network endpoint + group (for zonal NEGs) or in the zone within the region of + the NEG (for regional NEGs). If the ipAddress is specified, + it must belongs to the VM instance. + + The name must be 1-63 characters long, and comply + withRFC1035 or be a valid URL pointing to an existing instance. This field is a member of `oneof`_ ``_instance``. @@ -86179,13 +99269,14 @@ class NetworkEndpoint(proto.Message): or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to - will be used. This field is redundant and need not be set - for network endpoints of type GCE_VM_IP. If set, it must be - set to the primary internal IP address of the attached VM - instance that matches the subnetwork of the NEG. The primary - internal IP address from any NIC of a multi-NIC VM instance - can be added to a NEG as long as it matches the NEG - subnetwork. + will be used. + + This field is redundant and need not be set for network + endpoints of typeGCE_VM_IP. If set, it must be set to the + primary internal IP address of the attached VM instance that + matches the subnetwork of the NEG. The primary internal IP + address from any NIC of a multi-NIC VM instance can be added + to a NEG as long as it matches the NEG subnetwork. This field is a member of `oneof`_ ``_ip_address``. ipv6_address (str): @@ -86195,8 +99286,9 @@ class NetworkEndpoint(proto.Message): port (int): Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. - This field can not be set for network endpoints of type - GCE_VM_IP. + + This field can not be set for network endpoints of + typeGCE_VM_IP. This field is a member of `oneof`_ ``_port``. """ @@ -86239,11 +99331,12 @@ class NetworkEndpoint(proto.Message): class NetworkEndpointGroup(proto.Message): - r"""Represents a collection of network endpoints. A network - endpoint group (NEG) defines how a set of endpoints should be - reached, whether they are reachable, and where they are located. - For more information about using NEGs for different use cases, - see Network endpoint groups overview. + r"""Represents a collection of network endpoints. + + A network endpoint group (NEG) defines how a set of endpoints + should be reached, whether they are reachable, and where they + are located. For more information about using NEGs for different + use cases, seeNetwork endpoint groups overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -86254,31 +99347,33 @@ class NetworkEndpointGroup(proto.Message): the network endpoint group. app_engine (google.cloud.compute_v1beta.types.NetworkEndpointGroupAppEngine): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_app_engine``. cloud_function (google.cloud.compute_v1beta.types.NetworkEndpointGroupCloudFunction): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_cloud_function``. cloud_run (google.cloud.compute_v1beta.types.NetworkEndpointGroupCloudRun): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_cloud_run``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. default_port (int): The default port used if the port number is not specified in - the network endpoint. Optional. If the network endpoint type - is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, - this field must not be specified. + the network endpoint. + + Optional. If the network endpoint type is either + GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this field + must not be specified. This field is a member of `oneof`_ ``_default_port``. description (str): @@ -86293,8 +99388,9 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#networkEndpointGroup for network endpoint group. + [Output Only] Type of the resource. + Alwayscompute#networkEndpointGroup for network endpoint + group. This field is a member of `oneof`_ ``_kind``. load_balancer (google.cloud.compute_v1beta.types.NetworkEndpointGroupLbNetworkEndpointGroup): @@ -86306,7 +99402,7 @@ class NetworkEndpointGroup(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -86322,28 +99418,31 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_network``. network_endpoint_type (str): Type of network endpoints in this network endpoint group. - Can be one of GCE_VM_IP, GCE_VM_IP_PORT, - NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, - INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, - GCE_VM_IP_PORTMAP. Check the NetworkEndpointType enum for - the list of possible values. + Can be one ofGCE_VM_IP, + GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, + INTERNET_FQDN_PORT,INTERNET_IP_PORT, + SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. Check + the NetworkEndpointType enum for the list of possible + values. This field is a member of `oneof`_ ``_network_endpoint_type``. psc_data (google.cloud.compute_v1beta.types.NetworkEndpointGroupPscData): - Optional. Only valid when networkEndpointType is - PRIVATE_SERVICE_CONNECT. + Optional. Only valid when networkEndpointType + isPRIVATE_SERVICE_CONNECT. This field is a member of `oneof`_ ``_psc_data``. psc_target_service (str): The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: - asia-northeast3-cloudkms.googleapis.com. Optional. Only - valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. + asia-northeast3-cloudkms.googleapis.com. + + Optional. Only valid when networkEndpointType + isPRIVATE_SERVICE_CONNECT. This field is a member of `oneof`_ ``_psc_target_service``. region (str): - [Output Only] The URL of the region where the network + [Output Only] The URL of theregion where the network endpoint group is located. This field is a member of `oneof`_ ``_region``. @@ -86352,10 +99451,9 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_self_link``. serverless_deployment (google.cloud.compute_v1beta.types.NetworkEndpointGroupServerlessDeployment): - Only valid when networkEndpointType is - SERVERLESS. Only one of cloudRun, appEngine, - cloudFunction or serverlessDeployment may be - set. + Only valid when networkEndpointType + isSERVERLESS. Only one of cloudRun,appEngine, + cloudFunction orserverlessDeployment may be set. This field is a member of `oneof`_ ``_serverless_deployment``. size (int): @@ -86369,7 +99467,7 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. zone (str): - [Output Only] The URL of the zone where the network endpoint + [Output Only] The URL of thezone where the network endpoint group is located. This field is a member of `oneof`_ ``_zone``. @@ -86377,9 +99475,9 @@ class NetworkEndpointGroup(proto.Message): class NetworkEndpointType(proto.Enum): r"""Type of network endpoints in this network endpoint group. Can be one - of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, - INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, - PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. + ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, + INTERNET_FQDN_PORT,INTERNET_IP_PORT, + SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. Values: UNDEFINED_NETWORK_ENDPOINT_TYPE (0): @@ -86551,15 +99649,15 @@ class NetworkEndpointGroupAggregatedList(proto.Message): A list of NetworkEndpointGroupsScopedList resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupAggregatedList for aggregated - lists of network endpoint groups. + [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupAggregatedList for + aggregated lists of network endpoint groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -86623,41 +99721,53 @@ class NetworkEndpointGroupAppEngine(proto.Message): r"""Configuration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided - explicitly or in the URL mask when service is present. Note: App - Engine service must be in the same project and located in the - same region as the Serverless NEG. + explicitly or in the URL mask when service is present. + + Note: App Engine service must be in the same project and located + in the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: service (str): - Optional serving service. The service name is - case-sensitive and must be 1-63 characters long. + Optional serving service. + + The service name is case-sensitive and must be + 1-63 characters long. + Example value: default, my-service. This field is a member of `oneof`_ ``_service``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse service - and version fields from a request URL. URL mask - allows for routing to multiple App Engine - services without having to create multiple - Network Endpoint Groups and backend services. - For example, the request URLs - foo1-dot-appname.appspot.com/v1 and - foo1-dot-appname.appspot.com/v2 can be backed by - the same Serverless NEG with URL mask - -dot-appname.appspot.com/. The - URL mask will parse them to { service = "foo1", - version = "v1" } and { service = "foo1", version - = "v2" } respectively. + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse service and version fields + from a request URL. URL mask allows for routing + to multiple App Engine services without having + to create multiple Network Endpoint Groups and + backend services. + + For example, the request + URLsfoo1-dot-appname.appspot.com/v1 + andfoo1-dot-appname.appspot.com/v2 can be backed + by the same Serverless NEG with URL + mask-dot-appname.appspot.com/. + The URL mask will parse them to { service = + "foo1", version = "v1" } and { service = "foo1", + version = "v2" } + respectively. This field is a member of `oneof`_ ``_url_mask``. version (str): - Optional serving version. The version name is - case-sensitive and must be 1-100 characters - long. Example value: v1, v2. + Optional serving version. + + The version name is case-sensitive and must be + 1-100 characters long. + + Example value: v1, v2. This field is a member of `oneof`_ ``_version``. """ @@ -86682,8 +99792,10 @@ class NetworkEndpointGroupAppEngine(proto.Message): class NetworkEndpointGroupCloudFunction(proto.Message): r"""Configuration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL - mask. Note: Cloud Function must be in the same project and - located in the same region as the Serverless NEG. + mask. + + Note: Cloud Function must be in the same project and located in + the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -86691,22 +99803,29 @@ class NetworkEndpointGroupCloudFunction(proto.Message): Attributes: function (str): A user-defined name of the Cloud Function. + The function name is case-sensitive and must be - 1-63 characters long. Example value: func1. + 1-63 characters long. + + Example value: func1. This field is a member of `oneof`_ ``_function``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse function - field from a request URL. URL mask allows for - routing to multiple Cloud Functions without - having to create multiple Network Endpoint - Groups and backend services. For example, - request URLs mydomain.com/function1 and - mydomain.com/function2 can be backed by the same - Serverless NEG with URL mask /. The - URL mask will parse them to { function = - "function1" } and { function = "function2" } + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse function field from a + request URL. URL mask allows for routing to + multiple Cloud Functions without having to + create multiple Network Endpoint Groups and + backend services. + + For example, request URLs mydomain.com/function1 + andmydomain.com/function2 can be backed by the + same Serverless NEG with URL mask /. + The URL mask will parse them to { function = + "function1" } and{ function = "function2" } respectively. This field is a member of `oneof`_ ``_url_mask``. @@ -86728,6 +99847,7 @@ class NetworkEndpointGroupCloudRun(proto.Message): r"""Configuration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask. + Note: Cloud Run service must be in the same project and located in the same region as the Serverless NEG. @@ -86737,31 +99857,40 @@ class NetworkEndpointGroupCloudRun(proto.Message): Attributes: service (str): Cloud Run service is the main resource of - Cloud Run. The service must be 1-63 characters - long, and comply with RFC1035. Example value: - "run-service". + Cloud Run. + The service must be 1-63 characters long, and + comply withRFC1035. + + Example value: "run-service". This field is a member of `oneof`_ ``_service``. tag (str): Optional Cloud Run tag represents the "named-revision" to provide additional - fine-grained traffic routing information. The - tag must be 1-63 characters long, and comply - with RFC1035. Example value: "revision-0010". + fine-grained traffic routing information. + + The tag must be 1-63 characters long, and comply + withRFC1035. + + Example value: "revision-0010". This field is a member of `oneof`_ ``_tag``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse - and fields from a request URL. - URL mask allows for routing to multiple Run - services without having to create multiple - network endpoint groups and backend services. + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse and fields + from a request URL. URL mask allows for routing + to multiple Run services without having to + create multiple network endpoint groups and + backend services. + For example, request URLs foo1.domain.com/bar1 - and foo1.domain.com/bar2 can be backed by the + andfoo1.domain.com/bar2 can be backed by the same Serverless Network Endpoint Group (NEG) - with URL mask .domain.com/. The - URL mask will parse them to { service="bar1", + with URL mask.domain.com/. The URL + mask will parse them to { service="bar1", tag="foo1" } and { service="bar2", tag="foo2" } respectively. @@ -86793,10 +99922,11 @@ class NetworkEndpointGroupLbNetworkEndpointGroup(proto.Message): Attributes: default_port (int): The default port used if the port number is not specified in - the network endpoint. If the network endpoint type is either - GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field - must not be specified. [Deprecated] This field is - deprecated. + the network endpoint. + + If the network endpoint type is either GCE_VM_IP,SERVERLESS + or PRIVATE_SERVICE_CONNECT, this field must not be + specified. [Deprecated] This field is deprecated. This field is a member of `oneof`_ ``_default_port``. network (str): @@ -86812,7 +99942,7 @@ class NetworkEndpointGroupLbNetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. zone (str): - [Output Only] The URL of the zone where the network endpoint + [Output Only] The URL of thezone where the network endpoint group is located. [Deprecated] This field is deprecated. This field is a member of `oneof`_ ``_zone``. @@ -86854,15 +99984,15 @@ class NetworkEndpointGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpointGroup]): A list of NetworkEndpointGroup resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupList for network endpoint group - lists. + [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupList for network endpoint + group lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -87008,9 +100138,9 @@ class PscConnectionStatus(proto.Enum): class NetworkEndpointGroupServerlessDeployment(proto.Message): r"""Configuration for a serverless network endpoint group (NEG). - The platform must be provided. Note: The target backend service - must be in the same project and located in the same region as - the Serverless NEG. + Theplatform must be provided. + Note: The target backend service must be in the same project and + located in the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -87018,8 +100148,8 @@ class NetworkEndpointGroupServerlessDeployment(proto.Message): Attributes: platform (str): The platform of the backend target(s) of this - NEG. The only supported value is API Gateway: - apigateway.googleapis.com. + NEG. The only supported value is + API Gateway: apigateway.googleapis.com. This field is a member of `oneof`_ ``_platform``. resource (str): @@ -87027,33 +100157,48 @@ class NetworkEndpointGroupServerlessDeployment(proto.Message): workload/instance. This value must be provided explicitly or in the urlMask. The resource identified by this value is platform-specific - and is as follows: 1. API Gateway: The gateway - ID 2. App Engine: The service name 3. Cloud - Functions: The function name 4. Cloud Run: The - service name + and is as follows: + + + + 1. API Gateway: The gateway ID + 2. App Engine: The service name + 3. Cloud Functions: The function name + 4. Cloud Run: The service name This field is a member of `oneof`_ ``_resource``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse - platform-specific fields from a request URL. URL - mask allows for routing to multiple resources on - the same serverless platform without having to - create multiple Network Endpoint Groups and - backend resources. The fields parsed by this - template are platform-specific and are as - follows: 1. API Gateway: The gateway ID 2. App - Engine: The service and version 3. Cloud - Functions: The function name 4. Cloud Run: The - service and tag + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse platform-specific fields + from a request URL. URL mask allows for routing + to multiple resources on the same serverless + platform without having to create multiple + Network Endpoint Groups and backend resources. + The fields parsed by this template are + platform-specific and are as follows: + + + + 1. API Gateway: The gateway ID + 2. App Engine: The service and version + 3. Cloud Functions: The function name + 4. Cloud Run: The service and tag This field is a member of `oneof`_ ``_url_mask``. version (str): The optional resource version. The version identified by this value is platform-specific - and is follows: 1. API Gateway: Unused 2. App - Engine: The service version 3. Cloud Functions: - Unused 4. Cloud Run: The service tag + and is follows: + + + + 1. API Gateway: Unused + 2. App Engine: The service version + 3. Cloud Functions: Unused + 4. Cloud Run: The service tag This field is a member of `oneof`_ ``_version``. """ @@ -87126,9 +100271,9 @@ class NetworkEndpointGroupsListEndpointsRequest(proto.Message): health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specify this parameter, the health status of network - endpoints will not be provided. Check the - HealthStatus enum for the list of possible - values. + endpoints will not be provided. + Check the HealthStatus enum for the list of + possible values. This field is a member of `oneof`_ ``_health_status``. """ @@ -87202,16 +100347,16 @@ class NetworkEndpointGroupsListNetworkEndpoints(proto.Message): A list of NetworkEndpointWithHealthStatus resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupsListNetworkEndpoints for the - list of network endpoints in the specified network endpoint - group. + [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupsListNetworkEndpoints for + the list of network endpoints in the specified network + endpoint group. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -87262,7 +100407,7 @@ class NetworkEndpointGroupsScopedList(proto.Message): Attributes: network_endpoint_groups (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpointGroup]): - [Output Only] The list of network endpoint groups that are + [Output Only] The list ofnetwork endpoint groups that are contained in this scope. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] An informational warning that replaces the @@ -87294,6 +100439,7 @@ class NetworkEndpointWithHealthStatus(proto.Message): Attributes: healths (MutableSequence[google.cloud.compute_v1beta.types.HealthStatusForNetworkEndpoint]): [Output only] The health status of network endpoint. + Optional. Displayed only if the network endpoint has centralized health checking configured. network_endpoint (google.cloud.compute_v1beta.types.NetworkEndpoint): @@ -87330,15 +100476,15 @@ class NetworkFirewallPolicyAggregatedList(proto.Message): A list of FirewallPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkFirewallPoliciesAggregatedList for lists of - network firewall policies. + [Output Only] Type of resource. + Alwayscompute#networkFirewallPoliciesAggregatedList for + lists of network firewall policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -87407,8 +100553,8 @@ class NetworkInterface(proto.Message): access_configs (MutableSequence[google.cloud.compute_v1beta.types.AccessConfig]): An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - there are no accessConfigs specified, then this instance - will have no external internet access. + there are noaccessConfigs specified, then this instance will + have no external internet access. alias_ip_ranges (MutableSequence[google.cloud.compute_v1beta.types.AliasIpRange]): An array of alias IP ranges for this network interface. You can only specify this field for @@ -87417,11 +100563,11 @@ class NetworkInterface(proto.Message): Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a - NetworkInterface. An up-to-date fingerprint must - be provided in order to update the - NetworkInterface. The request will fail with - error 400 Bad Request if the fingerprint is not - provided, or 412 Precondition Failed if the + NetworkInterface. An up-to-date + fingerprint must be provided in order to update + theNetworkInterface. The request will fail with + error400 Bad Request if the fingerprint is not + provided, or412 Precondition Failed if the fingerprint is out of date. This field is a member of `oneof`_ ``_fingerprint``. @@ -87446,9 +100592,10 @@ class NetworkInterface(proto.Message): ipv6_access_type (str): [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is - always inherited from its subnetwork. Valid only if - stackType is IPV4_IPV6. Check the Ipv6AccessType enum for - the list of possible values. + always inherited from its subnetwork. + + Valid only if stackType is IPV4_IPV6. Check the + Ipv6AccessType enum for the list of possible values. This field is a member of `oneof`_ ``_ipv6_access_type``. ipv6_address (str): @@ -87462,15 +100609,15 @@ class NetworkInterface(proto.Message): This field is a member of `oneof`_ ``_ipv6_address``. kind (str): - [Output Only] Type of the resource. Always - compute#networkInterface for network interfaces. + [Output Only] Type of the resource. + Alwayscompute#networkInterface for network interfaces. This field is a member of `oneof`_ ``_kind``. name (str): [Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 - and 7. The default interface value is nic0. + and7. The default interface value is nic0. This field is a member of `oneof`_ ``_name``. network (str): @@ -87482,13 +100629,17 @@ class NetworkInterface(proto.Message): network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is - inferred. If you specify this property, you can - specify the network as a full or partial URL. - For example, the following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/global/networks/ - network - - projects/project/global/networks/network - - global/networks/default + inferred. + + If you specify this property, you can specify + the network as a full or partial URL. For + example, the following are all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/networks/network + - projects/project/global/networks/network + - global/networks/default This field is a member of `oneof`_ ``_network``. network_attachment (str): @@ -87506,8 +100657,8 @@ class NetworkInterface(proto.Message): This field is a member of `oneof`_ ``_network_i_p``. nic_type (str): The type of vNIC to be used on this - interface. This may be gVNIC or VirtioNet. Check - the NicType enum for the list of possible + interface. This may be gVNIC or VirtioNet. + Check the NicType enum for the list of possible values. This field is a member of `oneof`_ ``_nic_type``. @@ -87526,30 +100677,34 @@ class NetworkInterface(proto.Message): stack_type (str): The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 - addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is - used. This field can be both set at instance creation and - update network interface operations. Check the StackType - enum for the list of possible values. + addresses, useIPV4_IPV6. If not specified, IPV4_ONLY is + used. + + This field can be both set at instance creation and update + network interface operations. Check the StackType enum for + the list of possible values. This field is a member of `oneof`_ ``_stack_type``. subnetwork (str): The URL of the Subnetwork resource for this - instance. If the network resource is in legacy + instance. If the network resource is inlegacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. - For example, the following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /subnetworks/subnetwork - - regions/region/subnetworks/subnetwork + For example, the following are all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork + - regions/region/subnetworks/subnetwork This field is a member of `oneof`_ ``_subnetwork``. vlan (int): VLAN tag of a dynamic network interface, must - be an integer in the range from 2 to 255 + be an integer in the range from 2 to 255 inclusively. This field is a member of `oneof`_ ``_vlan``. @@ -87578,7 +100733,9 @@ class IgmpQuery(proto.Enum): class Ipv6AccessType(proto.Enum): r"""[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited - from its subnetwork. Valid only if stackType is IPV4_IPV6. + from its subnetwork. + + Valid only if stackType is IPV4_IPV6. Values: UNDEFINED_IPV6_ACCESS_TYPE (0): @@ -87630,9 +100787,10 @@ class NicType(proto.Enum): class StackType(proto.Enum): r"""The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, - use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can - be both set at instance creation and update network interface - operations. + useIPV4_IPV6. If not specified, IPV4_ONLY is used. + + This field can be both set at instance creation and update network + interface operations. Values: UNDEFINED_STACK_TYPE (0): @@ -87774,7 +100932,7 @@ class NetworkList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -87837,11 +100995,15 @@ class NetworkParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -87862,13 +101024,13 @@ class NetworkPeering(proto.Message): Attributes: auto_create_routes (bool): - This field will be deprecated soon. Use the - exchange_subnet_routes field instead. Indicates whether full - mesh connectivity is created and managed automatically + This field will be deprecated soon. Use + theexchange_subnet_routes field instead. Indicates whether + full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks - when peering state is ACTIVE. + when peering state isACTIVE. This field is a member of `oneof`_ ``_auto_create_routes``. connection_status (google.cloud.compute_v1beta.types.NetworkPeeringConnectionStatus): @@ -87883,7 +101045,7 @@ class NetworkPeering(proto.Message): true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state - is ACTIVE. + isACTIVE. This field is a member of `oneof`_ ``_exchange_subnet_routes``. export_custom_routes (bool): @@ -87894,9 +101056,10 @@ class NetworkPeering(proto.Message): export_subnet_routes_with_public_ip (bool): Whether subnet routes with public IP range are exported. The default value is true, all - subnet routes are exported. IPv4 special-use - ranges are always exported to peers and are not - controlled by this field. + subnet routes are exported.IPv4 special-use + ranges are always + exported to peers and are not controlled by this + field. This field is a member of `oneof`_ ``_export_subnet_routes_with_public_ip``. import_custom_routes (bool): @@ -87906,14 +101069,15 @@ class NetworkPeering(proto.Message): This field is a member of `oneof`_ ``_import_custom_routes``. import_subnet_routes_with_public_ip (bool): Whether subnet routes with public IP range - are imported. The default value is false. IPv4 - special-use ranges are always imported from - peers and are not controlled by this field. + are imported. The default value is false.IPv4 + special-use ranges are always + imported from peers and are not controlled by + this field. This field is a member of `oneof`_ ``_import_subnet_routes_with_public_ip``. name (str): Name of this peering. Provided by the client when the - peering is created. The name must comply with RFC1035. + peering is created. The name must comply withRFC1035. Specifically, the name must be 1-63 characters long and match regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all the @@ -88017,10 +101181,11 @@ class UpdateStrategy(proto.Enum): Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the - matching peering. To delete a peering with the - consensus update strategy, both the peerings - must request the deletion of the peering before - the peering can be deleted. + matching peering. + To delete a peering with the consensus update + strategy, both the peerings must request the + deletion of the peering before the peering can + be deleted. INDEPENDENT (127011674): In this mode, changes to the peering configuration can be unilaterally altered by @@ -88151,10 +101316,11 @@ class UpdateStrategy(proto.Enum): Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the - matching peering. To delete a peering with the - consensus update strategy, both the peerings - must request the deletion of the peering before - the peering can be deleted. + matching peering. + To delete a peering with the consensus update + strategy, both the peerings must request the + deletion of the peering before the peering can + be deleted. INDEPENDENT (127011674): In this mode, changes to the peering configuration can be unilaterally altered by @@ -88192,7 +101358,7 @@ class UpdateStrategy(proto.Enum): class NetworkPeeringConnectionStatusConsensusState(proto.Message): r"""The status of update/delete for a consensus peering connection. Only - set when connection_status.update_strategy is CONSENSUS or a network + set when connection_status.update_strategy isCONSENSUS or a network peering is proposing to update the strategy to CONSENSUS. @@ -88247,7 +101413,7 @@ class UpdateStatus(proto.Enum): set. IN_SYNC (2273653): No pending configuration update proposals to - the peering connection. + the peering connection. PENDING_LOCAL_ACKNOWLEDMENT (229926592): The peer network admin has made an updatePeering call. The change is awaiting @@ -88436,7 +101602,7 @@ class NetworkPolicy(proto.Message): [Output Only] A list of associations that belong to this network policy. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -88451,8 +101617,8 @@ class NetworkPolicy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#networkPolicy for network policies + [Output only] Type of the resource. + Alwayscompute#networkPolicy for network policies This field is a member of `oneof`_ ``_kind``. name (str): @@ -88559,15 +101725,15 @@ class NetworkPolicyAggregatedList(proto.Message): A list of NetworkPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkPolicyAggregatedList for lists of network - policies. + [Output Only] Type of resource. + Alwayscompute#networkPolicyAggregatedList for lists of + network policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -88670,14 +101836,15 @@ class NetworkPolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicy]): A list of NetworkPolicy resources. kind (str): - [Output Only] Type of resource. Always - compute#networkPolicyList for lists of network policies. + [Output Only] Type of resource. + Alwayscompute#networkPolicyList for lists of network + policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -88748,9 +101915,9 @@ class NetworkPolicyTrafficClassificationRule(proto.Message): This field is a member of `oneof`_ ``_disabled``. kind (str): - [Output only] Type of the resource. Always - compute#networkPolicyTrafficClassificationRule for network - policy traffic classification rules + [Output only] Type of the resource. + Alwayscompute#networkPolicyTrafficClassificationRule for + network policy traffic classification rules This field is a member of `oneof`_ ``_kind``. match (google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleMatcher): @@ -88790,9 +101957,9 @@ class NetworkPolicyTrafficClassificationRule(proto.Message): targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as - targetServiceAccounts. If neither - targetServiceAccounts nor targetSecureTag are - specified, the traffic classification rule + targetServiceAccounts. If + neithertargetServiceAccounts nor targetSecureTag + are specified, the traffic classification rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. @@ -88864,9 +102031,11 @@ class NetworkPolicyTrafficClassificationRuleAction(proto.Message): Attributes: dscp_mode (str): - The traffic class that should be applied to - the matching packet. Check the DscpMode enum for - the list of possible values. + DSCP mode. When set to AUTO, the DSCP value + will be picked automatically based on selected + trafficClass. Otherwise,dscpValue needs to be + explicitly specified. Check the DscpMode enum + for the list of possible values. This field is a member of `oneof`_ ``_dscp_mode``. dscp_value (int): @@ -88887,8 +102056,9 @@ class NetworkPolicyTrafficClassificationRuleAction(proto.Message): """ class DscpMode(proto.Enum): - r"""The traffic class that should be applied to the matching - packet. + r"""DSCP mode. When set to AUTO, the DSCP value will be picked + automatically based on selected trafficClass. + Otherwise,dscpValue needs to be explicitly specified. Values: UNDEFINED_DSCP_MODE (0): @@ -88968,14 +102138,16 @@ class NetworkPolicyTrafficClassificationRuleMatcher(proto.Message): Attributes: dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - destination CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of destination CIDR IP ranges + allowed is 5000. layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleMatcherLayer4Config]): Pairs of IP protocols and ports that the rule should match. src_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - source CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of source CIDR IP ranges allowed + is 5000. """ dest_ip_ranges: MutableSequence[str] = proto.RepeatedField( @@ -89006,16 +102178,19 @@ class NetworkPolicyTrafficClassificationRuleMatcherLayer4Config(proto.Message): The protocol type is required when creating a traffic classification rule. This value can either be one of the following well known - protocol strings (tcp, udp, icmp, esp, ah, ipip, - sctp), or the IP protocol number. + protocol strings (tcp, udp, icmp,esp, ah, + ipip,sctp), or the IP protocol number. This field is a member of `oneof`_ ``_ip_protocol``. ports (MutableSequence[str]): An optional list of ports to which this rule applies. This - field is only applicable for UDP or TCP protocol. Each entry - must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. + field is only applicable for UDP, TCP or SCTP protocol. Each + entry must be either an integer or a range. If not + specified, this rule applies to connections through any + port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. """ ip_protocol: str = proto.Field( @@ -89091,7 +102266,7 @@ class NetworkProfile(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -89108,8 +102283,8 @@ class NetworkProfile(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#networkProfile for network profiles. + [Output Only] Type of the resource. + Alwayscompute#networkProfile for network profiles. This field is a member of `oneof`_ ``_kind``. location (google.cloud.compute_v1beta.types.NetworkProfileLocation): @@ -89255,9 +102430,9 @@ class NetworkProfileNetworkFeatures(proto.Message): the list of possible values. allow_alias_ip_ranges (str): Specifies whether alias IP ranges (and - secondary address ranges) are allowed. Check the - AllowAliasIpRanges enum for the list of possible - values. + secondary address ranges) are allowed. + Check the AllowAliasIpRanges enum for the list + of possible values. This field is a member of `oneof`_ ``_allow_alias_ip_ranges``. allow_auto_mode_subnet (str): @@ -89299,6 +102474,13 @@ class NetworkProfileNetworkFeatures(proto.Message): possible values. This field is a member of `oneof`_ ``_allow_external_ip_access``. + allow_firewall_policy (str): + Specifies whether firewall policy can be + attached to the network. Check the + AllowFirewallPolicy enum for the list of + possible values. + + This field is a member of `oneof`_ ``_allow_firewall_policy``. allow_interconnect (str): Specifies whether Cloud Interconnect creation is allowed. Check the AllowInterconnect enum for @@ -89324,6 +102506,12 @@ class NetworkProfileNetworkFeatures(proto.Message): possible values. This field is a member of `oneof`_ ``_allow_multi_nic_in_same_network``. + allow_multicast (str): + Specifies whether multicast is allowed. + Check the AllowMulticast enum for the list of + possible values. + + This field is a member of `oneof`_ ``_allow_multicast``. allow_ncc (str): Specifies whether NCC is allowed. Check the AllowNcc enum for the list of possible @@ -89385,11 +102573,20 @@ class NetworkProfileNetworkFeatures(proto.Message): values. This field is a member of `oneof`_ ``_allow_vpn``. + firewall_policy_types (MutableSequence[str]): + Check the FirewallPolicyTypes enum for the + list of possible values. interface_types (MutableSequence[str]): If set, limits the interface types that the network supports. If empty, all interface types are supported. Check the InterfaceTypes enum for the list of possible values. + multicast (str): + Specifies which type of multicast is + supported. Check the Multicast enum for the list + of possible values. + + This field is a member of `oneof`_ ``_multicast``. subnet_purposes (MutableSequence[str]): Specifies which subnetwork purposes are supported. Check the SubnetPurposes enum for the @@ -89578,6 +102775,23 @@ class AllowExternalIpAccess(proto.Enum): EXTERNAL_IP_ACCESS_ALLOWED = 109530193 EXTERNAL_IP_ACCESS_BLOCKED = 462564501 + class AllowFirewallPolicy(proto.Enum): + r"""Specifies whether firewall policy can be attached to the + network. + + Values: + UNDEFINED_ALLOW_FIREWALL_POLICY (0): + A value indicating that the enum field is not + set. + FIREWALL_POLICY_ALLOWED (388488346): + No description available. + FIREWALL_POLICY_BLOCKED (204651742): + No description available. + """ + UNDEFINED_ALLOW_FIREWALL_POLICY = 0 + FIREWALL_POLICY_ALLOWED = 388488346 + FIREWALL_POLICY_BLOCKED = 204651742 + class AllowInterconnect(proto.Enum): r"""Specifies whether Cloud Interconnect creation is allowed. @@ -89642,6 +102856,22 @@ class AllowMultiNicInSameNetwork(proto.Enum): MULTI_NIC_IN_SAME_NETWORK_ALLOWED = 457555419 MULTI_NIC_IN_SAME_NETWORK_BLOCKED = 273718815 + class AllowMulticast(proto.Enum): + r"""Specifies whether multicast is allowed. + + Values: + UNDEFINED_ALLOW_MULTICAST (0): + A value indicating that the enum field is not + set. + MULTICAST_ALLOWED (44693537): + No description available. + MULTICAST_BLOCKED (397727845): + No description available. + """ + UNDEFINED_ALLOW_MULTICAST = 0 + MULTICAST_ALLOWED = 44693537 + MULTICAST_BLOCKED = 397727845 + class AllowNcc(proto.Enum): r"""Specifies whether NCC is allowed. @@ -89802,6 +103032,22 @@ class AllowVpn(proto.Enum): VPN_ALLOWED = 162163997 VPN_BLOCKED = 515198305 + class FirewallPolicyTypes(proto.Enum): + r""" + + Values: + UNDEFINED_FIREWALL_POLICY_TYPES (0): + A value indicating that the enum field is not + set. + RDMA_ROCE_POLICY (148757145): + No description available. + VPC_POLICY (74319208): + No description available. + """ + UNDEFINED_FIREWALL_POLICY_TYPES = 0 + RDMA_ROCE_POLICY = 148757145 + VPC_POLICY = 74319208 + class InterfaceTypes(proto.Enum): r""" @@ -89830,6 +103076,22 @@ class InterfaceTypes(proto.Enum): UNSPECIFIED_NIC_TYPE = 67411801 VIRTIO_NET = 452123481 + class Multicast(proto.Enum): + r"""Specifies which type of multicast is supported. + + Values: + UNDEFINED_MULTICAST (0): + A value indicating that the enum field is not + set. + MULTICAST_SDN (532209462): + No description available. + MULTICAST_ULL (532211630): + No description available. + """ + UNDEFINED_MULTICAST = 0 + MULTICAST_SDN = 532209462 + MULTICAST_ULL = 532211630 + class SubnetPurposes(proto.Enum): r""" @@ -89920,7 +103182,7 @@ class SubnetworkStackTypes(proto.Enum): New VMs in this subnet will only be assigned IPv4 addresses. IPV6_ONLY (79632100): - New VMs in this subnet will only be assigned + New VMs in this subnet will only be assigned IPv6 addresses. """ UNDEFINED_SUBNETWORK_STACK_TYPES = 0 @@ -89983,6 +103245,11 @@ class Unicast(proto.Enum): number=131538110, optional=True, ) + allow_firewall_policy: str = proto.Field( + proto.STRING, + number=254200923, + optional=True, + ) allow_interconnect: str = proto.Field( proto.STRING, number=280512964, @@ -90003,6 +103270,11 @@ class Unicast(proto.Enum): number=88251004, optional=True, ) + allow_multicast: str = proto.Field( + proto.STRING, + number=11002498, + optional=True, + ) allow_ncc: str = proto.Field( proto.STRING, number=372354904, @@ -90053,10 +103325,19 @@ class Unicast(proto.Enum): number=372363006, optional=True, ) + firewall_policy_types: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=390742027, + ) interface_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=157981171, ) + multicast: str = proto.Field( + proto.STRING, + number=404098040, + optional=True, + ) subnet_purposes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=301338039, @@ -90211,14 +103492,14 @@ class NetworkProfilesListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkProfile]): A list of NetworkProfile resources. kind (str): - [Output Only] Type of resource. Always - compute#networkProfileList for network profiles. + [Output Only] Type of resource. + Alwayscompute#networkProfileList for network profiles. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -90304,17 +103585,17 @@ class NetworkRoutingConfig(proto.Message): The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY - (default) or STANDARD. Check the - BgpBestPathSelectionMode enum for the list of - possible values. + (default) or STANDARD. + Check the BgpBestPathSelectionMode enum for the + list of possible values. This field is a member of `oneof`_ ``_bgp_best_path_selection_mode``. bgp_inter_region_cost (str): Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT - or ADD_COST_TO_MED. Check the BgpInterRegionCost enum for - the list of possible values. + orADD_COST_TO_MED. Check the BgpInterRegionCost enum for the + list of possible values. This field is a member of `oneof`_ ``_bgp_inter_region_cost``. effective_bgp_always_compare_med (bool): @@ -90333,7 +103614,7 @@ class NetworkRoutingConfig(proto.Message): to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set - to GLOBAL, this network's Cloud Routers will + toGLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. Check the RoutingMode enum for the list of possible values. @@ -90362,7 +103643,7 @@ class BgpBestPathSelectionMode(proto.Enum): class BgpInterRegionCost(proto.Enum): r"""Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path - selection algorithm. Can be DEFAULT or ADD_COST_TO_MED. Additional + selection algorithm. Can be DEFAULT orADD_COST_TO_MED. Additional supported values which may be not listed in the enum directly due to technical reasons: ADD_COST_TO_MED DEFAULT @@ -90395,7 +103676,7 @@ class RoutingMode(proto.Enum): r"""The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set - to GLOBAL, this network's Cloud Routers will advertise routes + toGLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. Values: @@ -90450,13 +103731,13 @@ class NetworksAddPeeringRequest(proto.Message): Attributes: auto_create_routes (bool): - This field will be deprecated soon. Use - exchange_subnet_routes in network_peering instead. Indicates - whether full mesh connectivity is created and managed - automatically between peered networks. Currently this field - should always be true since Google Compute Engine will - automatically create and manage subnetwork routes between - two networks when peering state is ACTIVE. + This field will be deprecated soon. + Useexchange_subnet_routes in network_peering instead. + Indicates whether full mesh connectivity is created and + managed automatically between peered networks. Currently + this field should always be true since Google Compute Engine + will automatically create and manage subnetwork routes + between two networks when peering state isACTIVE. This field is a member of `oneof`_ ``_auto_create_routes``. name (str): @@ -90468,13 +103749,13 @@ class NetworksAddPeeringRequest(proto.Message): Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer - network, exchange_subnet_routes) in the network_peering + network,exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon. This field is a member of `oneof`_ ``_network_peering``. peer_network (str): - URL of the peer network. It can be either + URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that @@ -90514,9 +103795,9 @@ class NetworksGetEffectiveFirewallsResponse(proto.Message): firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): [Output Only] Effective firewalls from firewall policy. It returns Global Network Firewall Policies and Hierarchical - Firewall Policies. Use - regionNetworkFirewallPolicies.getEffectiveFirewalls to get - Regional Network Firewall Policies as well. + Firewall Policies. + UseregionNetworkFirewallPolicies.getEffectiveFirewalls to + get Regional Network Firewall Policies as well. firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): Effective firewalls on the network. organization_firewalls (MutableSequence[google.cloud.compute_v1beta.types.NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy]): @@ -90729,12 +104010,14 @@ class NetworksUpdatePeeringRequest(proto.Message): class NodeGroup(proto.Message): - r"""Represents a sole-tenant Node Group resource. A sole-tenant - node is a physical server that is dedicated to hosting VM - instances only for your specific project. Use sole-tenant nodes - to keep your instances physically separated from instances in - other projects, or to group your instances together on the same - host hardware. For more information, read Sole-tenant nodes. + r"""Represents a sole-tenant Node Group resource. + + A sole-tenant node is a physical server that is dedicated to + hosting VM instances only for your specific project. Use + sole-tenant nodes to keep your instances physically separated + from instances in other projects, or to group your instances + together on the same host hardware. For more information, + readSole-tenant nodes. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -90745,7 +104028,7 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_autoscaling_policy``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -90763,8 +104046,8 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeGroup for node group. + [Output Only] The type of the resource. + Alwayscompute#nodeGroup for node group. This field is a member of `oneof`_ ``_kind``. location_hint (str): @@ -90784,11 +104067,11 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_maintenance_interval``. maintenance_policy (str): Specifies how to handle instances when a node in the group - undergoes maintenance. Set to one of: DEFAULT, - RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default - value is DEFAULT. For more information, see Maintenance - policies. Check the MaintenancePolicy enum for the list of - possible values. + undergoes maintenance. Set to one of: + DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The + default value is DEFAULT. For more information, see + Maintenance policies. Check the MaintenancePolicy enum for + the list of possible values. This field is a member of `oneof`_ ``_maintenance_policy``. maintenance_window (google.cloud.compute_v1beta.types.NodeGroupMaintenanceWindow): @@ -90797,7 +104080,7 @@ class NodeGroup(proto.Message): name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -90847,13 +104130,13 @@ class MaintenanceInterval(proto.Enum): and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. + than the PERIODIC andRECURRENT options. PERIODIC (142804635): VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT (194244550): @@ -90861,7 +104144,7 @@ class MaintenanceInterval(proto.Enum): periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. @@ -90873,7 +104156,7 @@ class MaintenanceInterval(proto.Enum): class MaintenancePolicy(proto.Enum): r"""Specifies how to handle instances when a node in the group undergoes - maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or + maintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. @@ -91034,15 +104317,15 @@ class NodeGroupAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeGroupsScopedList]): A list of NodeGroupsScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeGroupAggregatedList for aggregated lists of node - groups. + [Output Only] Type of + resource.Alwayscompute#nodeGroupAggregatedList for + aggregated lists of node groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -91189,7 +104472,7 @@ class NodeGroupList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -91259,7 +104542,7 @@ class NodeGroupMaintenanceWindow(proto.Message): start_time (str): Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, - 08:00, 12:00, 16:00, or 20:00. For example, both + 08:00,12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. This field is a member of `oneof`_ ``_start_time``. @@ -91510,15 +104793,15 @@ class NodeGroupsListNodes(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NodeGroupNode]): A list of Node resources. kind (str): - [Output Only] The resource type, which is always - compute.nodeGroupsListNodes for the list of nodes in the - specified node group. + [Output Only] The resource type, which is + alwayscompute.nodeGroupsListNodes for the list of nodes in + the specified node group. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -91661,9 +104944,11 @@ class NodeGroupsSimulateMaintenanceEventRequest(proto.Message): class NodeTemplate(proto.Message): - r"""Represent a sole-tenant Node Template resource. You can use a - template to define properties for nodes in a node group. For - more information, read Creating node groups and instances. + r"""Represent a sole-tenant Node Template resource. + + You can use a template to define properties for nodes in a node + group. For more information, readCreating node groups + and instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -91678,7 +104963,7 @@ class NodeTemplate(proto.Message): This field is a member of `oneof`_ ``_cpu_overcommit_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -91695,14 +104980,14 @@ class NodeTemplate(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeTemplate for node templates. + [Output Only] The type of the resource. + Alwayscompute#nodeTemplate for node templates. This field is a member of `oneof`_ ``_kind``. name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -91733,16 +105018,22 @@ class NodeTemplate(proto.Message): This field is a member of `oneof`_ ``_self_link``. server_binding (google.cloud.compute_v1beta.types.ServerBinding): Sets the binding properties for the physical server. Valid - values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: - Restarts VMs on any available physical server - - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same - physical server whenever possible See Sole-tenant node - options for more information. + values include: + + :: + + - *[Default]* RESTART_NODE_ON_ANY_SERVER: + Restarts VMs on any available + physical server + - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same + physical server whenever possible + + See Sole-tenant node options for more information. This field is a member of `oneof`_ ``_server_binding``. status (str): [Output Only] The status of the node template. One of the - following values: CREATING, READY, and DELETING. Check the + following values:CREATING, READY, and DELETING. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -91774,7 +105065,7 @@ class CpuOvercommitType(proto.Enum): class Status(proto.Enum): r"""[Output Only] The status of the node template. One of the following - values: CREATING, READY, and DELETING. + values:CREATING, READY, and DELETING. Values: UNDEFINED_STATUS (0): @@ -91893,15 +105184,15 @@ class NodeTemplateAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeTemplatesScopedList]): A list of NodeTemplatesScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeTemplateAggregatedList for aggregated lists of - node templates. + [Output Only] Type of + resource.Alwayscompute#nodeTemplateAggregatedList for + aggregated lists of node templates. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -91982,7 +105273,7 @@ class NodeTemplateList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -92099,12 +105390,13 @@ class NodeTemplatesScopedList(proto.Message): class NodeType(proto.Message): - r"""Represent a sole-tenant Node Type resource. Each node within - a node group must have a node type. A node type specifies the - total amount of cores and memory for that node. Currently, the - only available node type is n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in multiple zones. For - more information read Node types. + r"""Represent a sole-tenant Node Type resource. + + Each node within a node group must have a node type. A node type + specifies the total amount of cores and memory for that node. + Currently, the only available node type is n1-node-96-624 node + type that has 96 vCPUs and 624 GB of memory, available in + multiple zones. For more information readNode types. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -92115,7 +105407,7 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_cpu_platform``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -92139,8 +105431,8 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeType for node types. + [Output Only] The type of the resource. + Alwayscompute#nodeType for node types. This field is a member of `oneof`_ ``_kind``. local_ssd_gb (int): @@ -92255,15 +105547,15 @@ class NodeTypeAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeTypesScopedList]): A list of NodeTypesScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeTypeAggregatedList for aggregated lists of node - types. + [Output Only] Type of + resource.Alwayscompute#nodeTypeAggregatedList for aggregated + lists of node types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -92344,7 +105636,7 @@ class NodeTypeList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -92426,17 +105718,21 @@ class NodeTypesScopedList(proto.Message): class NotificationEndpoint(proto.Message): - r"""Represents a notification endpoint. A notification endpoint - resource defines an endpoint to receive notifications when there - are status changes detected by the associated health check - service. For more information, see Health checks overview. + r"""Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive + notifications when there are status changes detected by the + associated health check service. + + For more information, see + Health checks overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -92457,14 +105753,15 @@ class NotificationEndpoint(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#notificationEndpoint for notification endpoints. + [Output Only] Type of the resource. + Alwayscompute#notificationEndpoint for notification + endpoints. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -92616,14 +105913,15 @@ class NotificationEndpointList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NotificationEndpoint]): A list of NotificationEndpoint resources. kind (str): - [Output Only] Type of the resource. Always - compute#notificationEndpoint for notification endpoints. + [Output Only] Type of the resource. + Alwayscompute#notificationEndpoint for notification + endpoints. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -92677,19 +105975,32 @@ def raw_page(self): class Operation(proto.Message): - r"""Represents an Operation resource. Google Compute Engine has three - Operation resources: \* - `Global `__ \* - `Regional `__ \* - `Zonal `__ You can - use an operation resource to manage asynchronous API requests. For - more information, read Handling API responses. Operations can be - global, regional or zonal. - For global operations, use the - ``globalOperations`` resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, use the - ``zoneOperations`` resource. For more information, read Global, - Regional, and Zonal Resources. Note that completed Operation - resources have a limited retention period. + r"""Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous API + requests. For more information, readHandling API responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal Resources. + + Note that completed Operation resources have a limited retention + period. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -92711,7 +106022,7 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_description``. end_time (str): [Output Only] The time that this operation was completed. - This value is in RFC3339 text format. + This value is inRFC3339 text format. This field is a member of `oneof`_ ``_end_time``. error (google.cloud.compute_v1beta.types.Error): @@ -92738,7 +106049,7 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_id``. insert_time (str): [Output Only] The time that this operation was requested. - This value is in RFC3339 text format. + This value is inRFC3339 text format. This field is a member of `oneof`_ ``_insert_time``. instances_bulk_insert_operation_metadata (google.cloud.compute_v1beta.types.InstancesBulkInsertOperationMetadata): @@ -92791,7 +106102,7 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_set_common_instance_metadata_operation_metadata``. start_time (str): [Output Only] The time that this operation was started by - the server. This value is in RFC3339 text format. + the server. This value is inRFC3339 text format. This field is a member of `oneof`_ ``_start_time``. status (google.cloud.compute_v1beta.types.Operation.Status): @@ -93188,9 +106499,9 @@ class OrganizationSecurityPoliciesListAssociationsResponse(proto.Message): associations (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyAssociation]): A list of associations. kind (str): - [Output Only] Type of securityPolicy associations. Always - compute#organizationSecurityPoliciesListAssociations for - lists of securityPolicy associations. + [Output Only] Type of securityPolicy associations. + Alwayscompute#organizationSecurityPoliciesListAssociations + for lists of securityPolicy associations. This field is a member of `oneof`_ ``_kind``. """ @@ -93217,9 +106528,10 @@ class OutlierDetection(proto.Message): Attributes: base_ejection_time (google.cloud.compute_v1beta.types.Duration): The base time that a backend endpoint is - ejected for. Defaults to 30000ms or 30s. After a - backend endpoint is returned back to the load - balancing pool, it can be ejected again in + ejected for. Defaults to 30000ms or 30s. + + After a backend endpoint is returned back to the + load balancing pool, it can be ejected again in another ejection analysis. Thus, the total ejection time is equal to the base ejection time multiplied by the number of times the backend @@ -93264,8 +106576,9 @@ class OutlierDetection(proto.Message): will be ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to - ramp it up slowly. Defaults to 100. Not - supported when the backend service uses + ramp it up slowly. Defaults to 100. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_enforcing_success_rate``. @@ -93274,8 +106587,9 @@ class OutlierDetection(proto.Message): sweeps. This can result in both new ejections and backend endpoints being returned to service. The interval is equal to the number of seconds - as defined in outlierDetection.interval.seconds - plus the number of nanoseconds as defined in + as defined in + outlierDetection.interval.seconds plus the + number of nanoseconds as defined in outlierDetection.interval.nanos. Defaults to 1 second. @@ -93295,7 +106609,9 @@ class OutlierDetection(proto.Message): setting, outlier detection via success rate statistics is not performed for any backend endpoint in the load balancing pool. Defaults to - 5. Not supported when the backend service uses + 5. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_success_rate_minimum_hosts``. @@ -93307,8 +106623,10 @@ class OutlierDetection(proto.Message): detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that backend - endpoint. Defaults to 100. Not supported when - the backend service uses Serverless NEG. + endpoint. Defaults to 100. + + Not supported when the backend service uses + Serverless NEG. This field is a member of `oneof`_ ``_success_rate_request_volume``. success_rate_stdev_factor (int): @@ -93319,8 +106637,9 @@ class OutlierDetection(proto.Message): rate: mean - (stdev \* successRateStdevFactor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. - Defaults to 1900. Not supported when the backend service - uses Serverless NEG. + Defaults to 1900. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_success_rate_stdev_factor``. """ @@ -93504,27 +106823,29 @@ class Type(proto.Enum): class PacketMirroring(proto.Message): - r"""Represents a Packet Mirroring resource. Packet Mirroring - clones the traffic of specified instances in your Virtual - Private Cloud (VPC) network and forwards it to a collector - destination, such as an instance group of an internal TCP/UDP - load balancer, for analysis or examination. For more information - about setting up Packet Mirroring, see Using Packet Mirroring. + r"""Represents a Packet Mirroring resource. + + Packet Mirroring clones the traffic of specified instances in + your Virtual Private Cloud (VPC) network and forwards it to a + collector destination, such as an instance group of an internal + TCP/UDP load balancer, for analysis or examination. + For more information about setting up Packet Mirroring, seeUsing + Packet Mirroring. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: collector_ilb (google.cloud.compute_v1beta.types.PacketMirroringForwardingRuleInfo): - The Forwarding Rule resource of type - loadBalancingScheme=INTERNAL that will be used - as collector for mirrored traffic. The specified - forwarding rule must have isMirroringCollector - set to true. + The Forwarding Rule resource of + typeloadBalancingScheme=INTERNAL that will be + used as collector for mirrored traffic. The + specified forwarding rule must have + isMirroringCollector set to true. This field is a member of `oneof`_ ``_collector_ilb``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -93537,8 +106858,11 @@ class PacketMirroring(proto.Message): Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on - the network. The default is TRUE. Check the - Enable enum for the list of possible values. + the network. + + The default is TRUE. + Check the Enable enum for the list of possible + values. This field is a member of `oneof`_ ``_enable``. filter (google.cloud.compute_v1beta.types.PacketMirroringFilter): @@ -93552,8 +106876,8 @@ class PacketMirroring(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#packetMirroring for packet mirrorings. + [Output Only] Type of the resource. + Alwayscompute#packetMirroring for packet mirrorings. This field is a member of `oneof`_ ``_kind``. mirrored_resources (google.cloud.compute_v1beta.types.PacketMirroringMirroredResourceInfo): @@ -93567,7 +106891,7 @@ class PacketMirroring(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -93589,8 +106913,10 @@ class PacketMirroring(proto.Message): there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered - priority value wins. Default value is 1000. - Valid range is 0 through 65535. + priority value wins. + + Default value is 1000. Valid range is 0 through + 65535. This field is a member of `oneof`_ ``_priority``. region (str): @@ -93607,7 +106933,9 @@ class PacketMirroring(proto.Message): class Enable(proto.Enum): r"""Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be - enforced on the network. The default is TRUE. + enforced on the network. + + The default is TRUE. Values: UNDEFINED_ENABLE (0): @@ -93713,7 +107041,7 @@ class PacketMirroringAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -93783,9 +107111,9 @@ class PacketMirroringFilter(proto.Message): Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges - is mirrored. If neither cidrRanges nor - IPProtocols is specified, all IPv4 traffic is - mirrored. + is mirrored. + If neither cidrRanges nor IPProtocols is + specified, all IPv4 traffic is mirrored. cidr_ranges (MutableSequence[str]): One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or @@ -93892,7 +107220,7 @@ class PacketMirroringList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -93953,17 +107281,21 @@ class PacketMirroringMirroredResourceInfo(proto.Message): A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this - packetMirroring. Note that this config will - apply only to those network interfaces of the - Instances that belong to the network specified - in this packetMirroring. You may specify a - maximum of 50 Instances. + packetMirroring. + + Note that this config will apply only to those + network interfaces of the Instances that belong + to the network specified in this + packetMirroring. + + You may specify a maximum of 50 Instances. subnetworks (MutableSequence[google.cloud.compute_v1beta.types.PacketMirroringMirroredResourceInfoSubnetInfo]): A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this - packetMirroring. You may specify a maximum of 5 - subnetworks. + packetMirroring. + + You may specify a maximum of 5 subnetworks. tags (MutableSequence[str]): A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags @@ -94126,7 +107458,7 @@ class PartnerMetadata(proto.Message): partner_metadata (MutableMapping[str, google.cloud.compute_v1beta.types.StructuredEntries]): Partner Metadata assigned to the instance. A map from a subdomain to entries map. Subdomain - name must be compliant with RFC1035 definition. + name must be compliant withRFC1035 definition. The total size of all keys and values must be less than 2MB. Subdomain 'metadata.compute.googleapis.com' is reserverd @@ -94168,17 +107500,21 @@ class PatchAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94228,17 +107564,21 @@ class PatchAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -94289,17 +107629,21 @@ class PatchBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94343,17 +107687,21 @@ class PatchBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94396,15 +107744,18 @@ class PatchCrossSiteNetworkRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -94467,17 +107818,21 @@ class PatchDiskSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -94531,17 +107886,21 @@ class PatchFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94581,17 +107940,21 @@ class PatchFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94637,17 +108000,21 @@ class PatchForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94695,17 +108062,21 @@ class PatchGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94750,17 +108121,21 @@ class PatchGlobalPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94804,17 +108179,21 @@ class PatchHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94858,17 +108237,21 @@ class PatchImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94912,22 +108295,26 @@ class PatchInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the managed instance group. + The name of the zone where + you want to create the managed instance group. """ instance_group_manager: str = proto.Field( @@ -94971,17 +108358,21 @@ class PatchInstanceSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -95038,15 +108429,18 @@ class PatchInterconnectAttachmentGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95102,17 +108496,21 @@ class PatchInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95160,15 +108558,18 @@ class PatchInterconnectGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95222,17 +108623,21 @@ class PatchInterconnectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95278,15 +108683,18 @@ class PatchNetworkAttachmentRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95341,17 +108749,21 @@ class PatchNetworkEdgeSecurityServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -95414,17 +108826,21 @@ class PatchNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95468,17 +108884,21 @@ class PatchNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95522,17 +108942,21 @@ class PatchNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -95576,17 +109000,21 @@ class PatchOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -95643,17 +109071,21 @@ class PatchPacketMirroringRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95704,17 +109136,21 @@ class PatchPacketMirroringRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95764,17 +109200,21 @@ class PatchPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95823,17 +109263,21 @@ class PatchPartnerMetadataInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -95874,8 +109318,8 @@ class PatchPerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_patch_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersPatchPerInstanceConfigsReq): The body resource for this request project (str): @@ -95885,23 +109329,27 @@ class PatchPerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -95938,8 +109386,8 @@ class PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. region (str): @@ -95952,17 +109400,21 @@ class PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96011,17 +109463,21 @@ class PatchPublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96068,17 +109524,21 @@ class PatchPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96130,17 +109590,21 @@ class PatchRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96170,6 +109634,67 @@ class PatchRegionAutoscalerRequest(proto.Message): ) +class PatchRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Patch. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to patch. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder + + This field is a member of `oneof`_ ``_request_id``. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + backend_bucket_resource: "BackendBucket" = proto.Field( + proto.MESSAGE, + number=380757784, + message="BackendBucket", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.Patch. See the method description for details. @@ -96191,17 +109716,21 @@ class PatchRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96230,6 +109759,72 @@ class PatchRegionBackendServiceRequest(proto.Message): ) +class PatchRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Patch. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck to update. + The name must be 1-63 characters long, and + comply with RFC1035. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) + composite_health_check_resource: "CompositeHealthCheck" = proto.Field( + proto.MESSAGE, + number=132195824, + message="CompositeHealthCheck", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionDiskSettingRequest(proto.Message): r"""A request message for RegionDiskSettings.Patch. See the method description for details. @@ -96249,17 +109844,21 @@ class PatchRegionDiskSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -96294,6 +109893,72 @@ class PatchRegionDiskSettingRequest(proto.Message): ) +class PatchRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Patch. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_aggregation_policy (str): + Name of the HealthAggregationPolicy to + update. The name must be 1-63 characters long, + and comply with RFC1035. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + ) + health_aggregation_policy_resource: "HealthAggregationPolicy" = proto.Field( + proto.MESSAGE, + number=293526971, + message="HealthAggregationPolicy", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionHealthCheckRequest(proto.Message): r"""A request message for RegionHealthChecks.Patch. See the method description for details. @@ -96315,17 +109980,21 @@ class PatchRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96377,17 +110046,21 @@ class PatchRegionHealthCheckServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96439,17 +110112,21 @@ class PatchRegionHealthSourceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96499,17 +110176,21 @@ class PatchRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96559,17 +110240,21 @@ class PatchRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96620,17 +110305,21 @@ class PatchRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96676,17 +110365,21 @@ class PatchRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -96746,17 +110439,21 @@ class PatchRegionSnapshotSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_settings_resource (google.cloud.compute_v1beta.types.SnapshotSettings): @@ -96810,17 +110507,21 @@ class PatchRegionSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -96872,17 +110573,21 @@ class PatchRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -96980,17 +110685,21 @@ class PatchResourcePolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource_policy (str): @@ -97050,17 +110759,21 @@ class PatchRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route_policy_resource (google.cloud.compute_v1beta.types.RoutePolicy): @@ -97111,17 +110824,21 @@ class PatchRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -97175,17 +110892,21 @@ class PatchRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97234,17 +110955,21 @@ class PatchRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97291,17 +111016,21 @@ class PatchRuleOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -97367,17 +111096,21 @@ class PatchRuleRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97550,17 +111283,21 @@ class PatchSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -97617,17 +111354,21 @@ class PatchServiceAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. service_attachment (str): @@ -97678,17 +111419,21 @@ class PatchSnapshotSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_settings_resource (google.cloud.compute_v1beta.types.SnapshotSettings): @@ -97736,17 +111481,21 @@ class PatchSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -97790,12 +111539,14 @@ class PatchSubnetworkRequest(proto.Message): the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following - conditions are true: - the subnetwork being patched has - purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork - being patched has role = BACKUP - the patch request is - setting the role to ACTIVE. Note that after this patch - operation the roles of the ACTIVE and BACKUP subnetworks - will be swapped. + conditions are true: + + - the subnetwork being patched has purpose = + INTERNAL_HTTPS_LOAD_BALANCER + - the subnetwork being patched has role = BACKUP + - the patch request is setting the role to ACTIVE. Note that + after this patch operation the roles of the ACTIVE and + BACKUP subnetworks will be swapped. This field is a member of `oneof`_ ``_drain_timeout_seconds``. project (str): @@ -97807,17 +111558,21 @@ class PatchSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -97870,17 +111625,21 @@ class PatchTargetGrpcProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_grpc_proxy (str): @@ -97925,17 +111684,21 @@ class PatchTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -97980,17 +111743,21 @@ class PatchTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -98050,17 +111817,21 @@ class PatchTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -98109,17 +111880,21 @@ class PatchUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map (str): @@ -98164,15 +111939,18 @@ class PatchWireGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -98237,38 +112015,50 @@ class PathMatcher(proto.Message): Attributes: default_custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): defaultCustomErrorResponsePolicy specifies how the Load - Balancer returns error responses when BackendServiceor - BackendBucket responds with an error. This policy takes - effect at the PathMatcher level and applies only when no - policy has been defined for the error code at lower levels - like RouteRule and PathRule within this PathMatcher. If an - error code does not have a policy defined in - defaultCustomErrorResponsePolicy, then a policy defined for - the error code in UrlMap.defaultCustomErrorResponsePolicy - takes effect. For example, consider a UrlMap with the - following configuration: - - UrlMap.defaultCustomErrorResponsePolicy is configured with - policies for 5xx and 4xx errors - A RouteRule for - /coming_soon/ is configured for the error code 404. If the - request is for www.myotherdomain.com and a 404 is - encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - RouteRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. When used in conjunction with - pathMatcher.defaultRouteAction.retryPolicy, retries take - precedence. Only once all retries are exhausted, the - defaultCustomErrorResponsePolicy is applied. While + Balancer returns error responses when + BackendServiceorBackendBucket responds with an error. + + This policy takes effect at the PathMatcher level and + applies only when no policy has been defined for the error + code at lower levels likeRouteRule and PathRule within + thisPathMatcher. If an error code does not have a policy + defined in defaultCustomErrorResponsePolicy, then a policy + defined for the error code in + UrlMap.defaultCustomErrorResponsePolicy takes effect. + + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy is configured + with policies for 5xx and 4xx errors + - A RouteRule for /coming_soon/ is configured for the + error code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in RouteRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + When used in conjunction + withpathMatcher.defaultRouteAction.retryPolicy, retries take + precedence. Only once all retries are exhausted, + thedefaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to - the client. defaultCustomErrorResponsePolicy is supported - only for global external Application Load Balancers. + the client. + + defaultCustomErrorResponsePolicy is supported only for + global external Application Load Balancers. This field is a member of `oneof`_ ``_default_custom_error_response_policy``. default_route_action (google.cloud.compute_v1beta.types.HttpRouteAction): @@ -98277,41 +112067,56 @@ class PathMatcher(proto.Message): balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected - backend. Only one of defaultUrlRedirect, - defaultService or - defaultRouteAction.weightedBackendService can be - set. URL maps for classic Application Load - Balancers only support the urlRewrite action - within a path matcher's defaultRouteAction. + backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + URL maps for classic Application Load Balancers + only support the urlRewrite action within a path + matcher'sdefaultRouteAction. This field is a member of `oneof`_ ``_default_route_action``. default_service (str): The full or partial URL to the BackendService resource. This - URL is used if none of the pathRules or routeRules defined - by this PathMatcher are matched. For example, the following - are all valid URLs to a BackendService resource: - - https://www.googleapis.com/compute/v1/projects/project - /global/backendServices/backendService - - compute/v1/projects/project/global/backendServices/backendService - - global/backendServices/backendService If - defaultRouteAction is also specified, advanced routing + URL is used if none of the pathRules orrouteRules defined by + this PathMatcher are matched. For example, the following are + all valid URLs to a BackendService resource: + + :: + + - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService + - compute/v1/projects/project/global/backendServices/backendService + - global/backendServices/backendService + + If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending - the request to the backend. Only one of defaultUrlRedirect, - defaultService or defaultRouteAction.weightedBackendService - can be set. Authorization requires one or more of the - following Google IAM permissions on the specified resource - default_service: - compute.backendBuckets.use - - compute.backendServices.use + the request to the backend. + + Only one of defaultUrlRedirect, defaultService or + defaultRouteAction.weightedBackendService can be set. + + Authorization requires one or more of the following Google + IAM permissions on the specified resource default_service: + + :: + + - compute.backendBuckets.use + - compute.backendServices.use This field is a member of `oneof`_ ``_default_service``. default_url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): - When none of the specified pathRules or - routeRules match, the request is redirected to a - URL specified by defaultUrlRedirect. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. Not supported when the URL map is bound to - a target gRPC proxy. + When none of the specified pathRules + orrouteRules match, the request is redirected to + a URL specified by defaultUrlRedirect. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_default_url_redirect``. description (str): @@ -98323,20 +112128,24 @@ class PathMatcher(proto.Message): header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backend service. HeaderAction specified - here are applied after the matching - HttpRouteRule HeaderAction and before the - HeaderAction in the UrlMap HeaderAction is not - supported for load balancers that have their - loadBalancingScheme set to EXTERNAL. Not - supported when the URL map is bound to a target - gRPC proxy that has validateForProxyless field - set to true. + selected backend service. + + HeaderAction specified here are applied after + the matchingHttpRouteRule HeaderAction and + before theHeaderAction in the UrlMap + + HeaderAction is not supported for load balancers + that have + their loadBalancingScheme set to EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. name (str): The name to which this PathMatcher is - referred by the HostRule. + referred by theHostRule. This field is a member of `oneof`_ ``_name``. path_rules (MutableSequence[google.cloud.compute_v1beta.types.PathRule]): @@ -98344,19 +112153,23 @@ class PathMatcher(proto.Message): when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the - longest-path-first basis. For example: a pathRule with a - path /a/b/c/\* will match before /a/b/\* irrespective of the - order in which those paths appear in this list. Within a - given pathMatcher, only one of pathRules or routeRules must - be set. + longest-path-first basis. + + For example: a pathRule with a path /a/b/c/\* will match + before /a/b/\* irrespective of the order in which those + paths appear in this list. + + Within a given pathMatcher, only one ofpathRules or + routeRules must be set. route_rules (MutableSequence[google.cloud.compute_v1beta.types.HttpRouteRule]): The list of HTTP route rules. Use this list - instead of pathRules when advanced route - matching and routing actions are desired. - routeRules are evaluated in order of priority, - from the lowest to highest number. Within a - given pathMatcher, you can set only one of - pathRules or routeRules. + instead ofpathRules when advanced route matching + and routing actions are desired. routeRules are + evaluated in order of priority, from the lowest + to highest number. + + Within a given pathMatcher, you can set only one + ofpathRules or routeRules. """ default_custom_error_response_policy: "CustomErrorResponsePolicy" = proto.Field( @@ -98412,7 +112225,7 @@ class PathMatcher(proto.Message): class PathRule(proto.Message): r"""A path-matching rule for a URL. If matched, will use the - specified BackendService to handle the traffic arriving at this + specifiedBackendService to handle the traffic arriving at this URL. @@ -98421,29 +112234,41 @@ class PathRule(proto.Message): Attributes: custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): customErrorResponsePolicy specifies how the Load Balancer - returns error responses when BackendServiceor BackendBucket - responds with an error. If a policy for an error code is not - configured for the PathRule, a policy for the error code - configured in pathMatcher.defaultCustomErrorResponsePolicy - is applied. If one is not specified in - pathMatcher.defaultCustomErrorResponsePolicy, the policy + returns error responses when BackendServiceorBackendBucket + responds with an error. + + If a policy for an error code is not configured for the + PathRule, a policy for the error code configured + inpathMatcher.defaultCustomErrorResponsePolicy is applied. + If one is not specified + inpathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes - effect. For example, consider a UrlMap with the following - configuration: - UrlMap.defaultCustomErrorResponsePolicy are - configured with policies for 5xx and 4xx errors - A PathRule - for /coming_soon/ is configured for the error code 404. If - the request is for www.myotherdomain.com and a 404 is - encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - PathRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. customErrorResponsePolicy is supported only for - global external Application Load Balancers. + effect. + + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy are configured + with policies for 5xx and 4xx errors + - A PathRule for /coming_soon/ is configured for the error + code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in PathRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + customErrorResponsePolicy is supported only for global + external Application Load Balancers. This field is a member of `oneof`_ ``_custom_error_response_policy``. paths (MutableSequence[str]): @@ -98457,11 +112282,14 @@ class PathRule(proto.Message): balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected - backend. Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + URL maps for classic Application Load Balancers only support the urlRewrite action within a path - rule's routeAction. + rule'srouteAction. This field is a member of `oneof`_ ``_route_action``. service (str): @@ -98470,16 +112298,19 @@ class PathRule(proto.Message): this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request - to the backend. Only one of urlRedirect, service - or routeAction.weightedBackendService can be - set. + to the backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. This field is a member of `oneof`_ ``_service``. url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. - Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + Not supported when the URL map is bound to a target gRPC proxy. @@ -98570,7 +112401,7 @@ class Status(proto.Enum): The per-instance configuration is being applied to the instance, but is not yet effective, possibly waiting for the instance to, - for example, REFRESH. + for example,REFRESH. DELETING (528602024): The per-instance configuration deletion is being applied on the instance, possibly waiting @@ -98638,17 +112469,21 @@ class PerformMaintenanceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -98693,17 +112528,21 @@ class PerformMaintenanceNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -98749,25 +112588,31 @@ class PerformMaintenanceReservationBlockRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. reservation_block (str): - The name of the reservation block. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation block. + Name should conform to RFC1035 or be a resource + ID. reservations_blocks_perform_maintenance_request_resource (google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest): The body resource for this request zone (str): @@ -98818,22 +112663,27 @@ class PerformMaintenanceReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. reservations_perform_maintenance_request_resource (google.cloud.compute_v1beta.types.ReservationsPerformMaintenanceRequest): The body resource for this request zone (str): @@ -98885,22 +112735,27 @@ class PerformMaintenanceReservationSubBlockRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. zone (str): Name of the zone for this request. Zone name should conform to RFC1035. @@ -98931,23 +112786,75 @@ class PerformMaintenanceReservationSubBlockRequest(proto.Message): class Policy(proto.Message): r"""An Identity and Access Management (IAM) policy, which specifies - access controls for Google Cloud resources. A ``Policy`` is a - collection of ``bindings``. A ``binding`` binds one or more - ``members``, or principals, to a single ``role``. Principals can be - user accounts, service accounts, Google groups, and domains (such as - G Suite). A ``role`` is a named list of permissions; each ``role`` - can be an IAM predefined role or a user-created custom role. For - some types of Google Cloud resources, a ``binding`` can also specify - a ``condition``, which is a logical expression that allows access to - a resource only if the expression evaluates to ``true``. A condition - can add constraints based on attributes of the request, the - resource, or both. To learn which resources support conditions in - their IAM policies, see the `IAM + access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds + one or more ``members``, or principals, to a single ``role``. + Principals can be user accounts, service accounts, Google groups, + and domains (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role or a + user-created custom role. + + For some types of Google Cloud resources, a ``binding`` can also + specify a ``condition``, which is a logical expression that allows + access to a resource only if the expression evaluates to ``true``. A + condition can add constraints based on attributes of the request, + the resource, or both. To learn which resources support conditions + in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -98962,8 +112869,9 @@ class Policy(proto.Message): Associates a list of ``members``, or principals, with a ``role``. Optionally, may specify a ``condition`` that determines how and when the ``bindings`` are applied. Each - of the ``bindings`` must contain at least one principal. The - ``bindings`` in a ``Policy`` can refer to up to 1,500 + of the ``bindings`` must contain at least one principal. + + The ``bindings`` in a ``Policy`` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the ``bindings`` grant 50 different @@ -98980,6 +112888,7 @@ class Policy(proto.Message): ``getIamPolicy``, and systems are expected to put that etag in the request to ``setIamPolicy`` to ensure that their change will be applied to the same version of the policy. + **Important:** If you use IAM Conditions, you must include the ``etag`` field whenever you call ``setIamPolicy``. If you omit this field, then IAM allows you to overwrite a @@ -98991,25 +112900,33 @@ class Policy(proto.Message): This field is a member of `oneof`_ ``_iam_owned``. version (int): - Specifies the format of the policy. Valid values are ``0``, - ``1``, and ``3``. Requests that specify an invalid value are - rejected. Any operation that affects conditional role - bindings must specify version ``3``. This requirement - applies to the following operations: \* Getting a policy - that includes a conditional role binding \* Adding a - conditional role binding to a policy \* Changing a - conditional role binding in a policy \* Removing any role - binding, with or without a condition, from a policy that - includes conditions **Important:** If you use IAM - Conditions, you must include the ``etag`` field whenever you - call ``setIamPolicy``. If you omit this field, then IAM - allows you to overwrite a version ``3`` policy with a - version ``1`` policy, and all of the conditions in the - version ``3`` policy are lost. If a policy does not include - any conditions, operations on that policy may specify any - valid version or leave the field unset. To learn which - resources support conditions in their IAM policies, see the - `IAM + Specifies the format of the policy. + + Valid values are ``0``, ``1``, and ``3``. Requests that + specify an invalid value are rejected. + + Any operation that affects conditional role bindings must + specify version ``3``. This requirement applies to the + following operations: + + - Getting a policy that includes a conditional role binding + - Adding a conditional role binding to a policy + - Changing a conditional role binding in a policy + - Removing any role binding, with or without a condition, + from a policy that includes conditions + + **Important:** If you use IAM Conditions, you must include + the ``etag`` field whenever you call ``setIamPolicy``. If + you omit this field, then IAM allows you to overwrite a + version ``3`` policy with a version ``1`` policy, and all of + the conditions in the version ``3`` policy are lost. + + If a policy does not include any conditions, operations on + that policy may specify any valid version or leave the field + unset. + + To learn which resources support conditions in their IAM + policies, see the `IAM documentation `__. This field is a member of `oneof`_ ``_version``. @@ -99124,8 +113041,8 @@ class PreservedStatePreservedDisk(proto.Message): This field is a member of `oneof`_ ``_auto_delete``. mode (str): - The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the + The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values. @@ -99158,8 +113075,8 @@ class AutoDelete(proto.Enum): ON_PERMANENT_INSTANCE_DELETION = 95727719 class Mode(proto.Enum): - r"""The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the disk in + r"""The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Values: @@ -99171,8 +113088,8 @@ class Mode(proto.Enum): can use a disk in READ_ONLY mode at a time. READ_WRITE (173607894): *[Default]* Attaches this disk in READ_WRITE mode. Only one - VM instance at a time can be attached to a disk in - READ_WRITE mode. + VM instance at a time can be attached to a disk inREAD_WRITE + mode. """ UNDEFINED_MODE = 0 READ_ONLY = 91950261 @@ -99208,8 +113125,9 @@ class PreservedStatePreservedNetworkIp(proto.Message): configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group - is deleted. Check the AutoDelete enum for the - list of possible values. + is deleted. + Check the AutoDelete enum for the list of + possible values. This field is a member of `oneof`_ ``_auto_delete``. ip_address (google.cloud.compute_v1beta.types.PreservedStatePreservedNetworkIpIpAddress): @@ -99220,10 +113138,10 @@ class PreservedStatePreservedNetworkIp(proto.Message): class AutoDelete(proto.Enum): r"""These stateful IPs will never be released during autohealing, - update or VM instance recreate operations. This flag is used to - configure if the IP reservation should be deleted after it is no - longer used by the group, e.g. when the given instance or the - whole group is deleted. + update or VM instance recreate operations. + This flag is used to configure if the IP reservation should be + deleted after it is no longer used by the group, e.g. when the + given instance or the whole group is deleted. Values: UNDEFINED_AUTO_DELETE (0): @@ -99294,7 +113212,7 @@ class PreviewFeature(proto.Message): This field is a member of `oneof`_ ``_activation_status``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -99416,7 +113334,7 @@ class PreviewFeatureList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -99504,9 +113422,12 @@ class PreviewFeatureRolloutOperationRolloutInput(proto.Message): Attributes: name (str): - The name of the rollout plan Ex. + The name of the rollout plan + Ex. organizations//locations/global/rolloutPlans/ - Ex. folders//locations/global/rolloutPlans/ Ex. + Ex. + folders//locations/global/rolloutPlans/ + Ex. projects//locations/global/rolloutPlans/. This field is a member of `oneof`_ ``_name``. @@ -99686,9 +113607,11 @@ class PreviewRouterRequest(proto.Message): class Project(proto.Message): - r"""Represents a Project resource. A project is used to organize - resources in a Google Cloud Platform environment. For more - information, read about the Resource Hierarchy. + r"""Represents a Project resource. + + A project is used to organize resources in a Google Cloud + Platform environment. For more information, read about the + Resource Hierarchy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -99696,10 +113619,12 @@ class Project(proto.Message): Attributes: cloud_armor_tier (str): [Output Only] The Cloud Armor tier for this project. It can - be one of the following values: CA_STANDARD, - CA_ENTERPRISE_PAYGO. If this field is not specified, it is - assumed to be CA_STANDARD. Check the CloudArmorTier enum for - the list of possible values. + be one of the following values: + CA_STANDARD,CA_ENTERPRISE_PAYGO. + + If this field is not specified, it is assumed to + beCA_STANDARD. Check the CloudArmorTier enum for the list of + possible values. This field is a member of `oneof`_ ``_cloud_armor_tier``. common_instance_metadata (google.cloud.compute_v1beta.types.Metadata): @@ -99709,16 +113634,17 @@ class Project(proto.Message): This field is a member of `oneof`_ ``_common_instance_metadata``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. default_network_tier (str): This signifies the default network tier used for configuring resources of the project and can - only take the following values: PREMIUM, + only take the following values:PREMIUM, STANDARD. Initially the default network tier is - PREMIUM. Check the DefaultNetworkTier enum for - the list of possible values. + PREMIUM. + Check the DefaultNetworkTier enum for the list + of possible values. This field is a member of `oneof`_ ``_default_network_tier``. default_service_account (str): @@ -99748,10 +113674,12 @@ class Project(proto.Message): This field is a member of `oneof`_ ``_kind``. managed_protection_tier (str): [Output Only] The Cloud Armor Managed Protection (CAMP) tier - for this project. It can be one of the following values: - CA_STANDARD, CAMP_PLUS_PAYGO. If this field is not - specified, it is assumed to be CA_STANDARD. Check the - ManagedProtectionTier enum for the list of possible values. + for this project. It can be one of the following + values:CA_STANDARD, CAMP_PLUS_PAYGO. + + If this field is not specified, it is assumed to + beCA_STANDARD. Check the ManagedProtectionTier enum for the + list of possible values. This field is a member of `oneof`_ ``_managed_protection_tier``. name (str): @@ -99790,10 +113718,11 @@ class Project(proto.Message): class CloudArmorTier(proto.Enum): r"""[Output Only] The Cloud Armor tier for this project. It can be one - of the following values: CA_STANDARD, CA_ENTERPRISE_PAYGO. If this - field is not specified, it is assumed to be CA_STANDARD. Additional - supported values which may be not listed in the enum directly due to - technical reasons: CA_STANDARD + of the following values: CA_STANDARD,CA_ENTERPRISE_PAYGO. + + If this field is not specified, it is assumed to beCA_STANDARD. + Additional supported values which may be not listed in the enum + directly due to technical reasons: CA_STANDARD Values: UNDEFINED_CLOUD_ARMOR_TIER (0): @@ -99813,8 +113742,8 @@ class CloudArmorTier(proto.Enum): class DefaultNetworkTier(proto.Enum): r"""This signifies the default network tier used for configuring - resources of the project and can only take the following values: - PREMIUM, STANDARD. Initially the default network tier is + resources of the project and can only take the following + values:PREMIUM, STANDARD. Initially the default network tier is PREMIUM. Values: @@ -99841,10 +113770,12 @@ class DefaultNetworkTier(proto.Enum): class ManagedProtectionTier(proto.Enum): r"""[Output Only] The Cloud Armor Managed Protection (CAMP) tier for - this project. It can be one of the following values: CA_STANDARD, - CAMP_PLUS_PAYGO. If this field is not specified, it is assumed to be - CA_STANDARD. Additional supported values which may be not listed in - the enum directly due to technical reasons: CA_STANDARD + this project. It can be one of the following values:CA_STANDARD, + CAMP_PLUS_PAYGO. + + If this field is not specified, it is assumed to beCA_STANDARD. + Additional supported values which may be not listed in the enum + directly due to technical reasons: CA_STANDARD Values: UNDEFINED_MANAGED_PROTECTION_TIER (0): @@ -100030,15 +113961,15 @@ class ProjectsGetXpnResources(proto.Message): Attributes: kind (str): - [Output Only] Type of resource. Always - compute#projectsGetXpnResources for lists of service + [Output Only] Type of resource. + Alwayscompute#projectsGetXpnResources for lists of service resources (a.k.a service projects) This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -100235,7 +114166,7 @@ class PublicAdvertisedPrefix(proto.Message): This field is a member of `oneof`_ ``_byoip_api_version``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -100256,11 +114187,11 @@ class PublicAdvertisedPrefix(proto.Message): ignored when inserting a new PublicAdvertisedPrefix. An up-to-date fingerprint must be provided in order to update - the PublicAdvertisedPrefix, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - PublicAdvertisedPrefix. + thePublicAdvertisedPrefix, otherwise the request + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a PublicAdvertisedPrefix. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -100273,16 +114204,22 @@ class PublicAdvertisedPrefix(proto.Message): represented by this public advertised prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + The internet access type for IPv6 Public + Advertised Prefixes. Check the Ipv6AccessType + enum for the list of possible values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. kind (str): - [Output Only] Type of the resource. Always - compute#publicAdvertisedPrefix for public advertised + [Output Only] Type of the resource. + Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -100292,14 +114229,19 @@ class PublicAdvertisedPrefix(proto.Message): This field is a member of `oneof`_ ``_name``. pdp_scope (str): Specifies how child public delegated prefix will be scoped. - It could be one of following values: - ``REGIONAL``: The - public delegated prefix is regional only. The provisioning - will take a few minutes. - ``GLOBAL``: The public delegated - prefix is global only. The provisioning will take ~4 weeks. - - ``GLOBAL_AND_REGIONAL`` [output only]: The public - delegated prefixes is BYOIP V1 legacy prefix. This is output - only value and no longer supported in BYOIP V2. Check the - PdpScope enum for the list of possible values. + It could be one of following values: + + :: + + - `REGIONAL`: The public delegated prefix is regional only. The + provisioning will take a few minutes. + - `GLOBAL`: The public delegated prefix is global only. The + provisioning will take ~4 weeks. + - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is + BYOIP V1 legacy prefix. This is output only value and no longer + supported in BYOIP V2. + + Check the PdpScope enum for the list of possible values. This field is a member of `oneof`_ ``_pdp_scope``. public_delegated_prefixs (MutableSequence[google.cloud.compute_v1beta.types.PublicAdvertisedPrefixPublicDelegatedPrefix]): @@ -100316,15 +114258,20 @@ class PublicAdvertisedPrefix(proto.Message): This field is a member of `oneof`_ ``_shared_secret``. status (str): The status of the public advertised prefix. Possible values - include: - ``INITIAL``: RPKI validation is complete. - - ``PTR_CONFIGURED``: User has configured the PTR. - - ``VALIDATED``: Reverse DNS lookup is successful. - - ``REVERSE_DNS_LOOKUP_FAILED``: Reverse DNS lookup failed. - - ``PREFIX_CONFIGURATION_IN_PROGRESS``: The prefix is being - configured. - ``PREFIX_CONFIGURATION_COMPLETE``: The prefix - is fully configured. - ``PREFIX_REMOVAL_IN_PROGRESS``: The - prefix is being removed. Check the Status enum for the list - of possible values. + include: + + :: + + - `INITIAL`: RPKI validation is complete. + - `PTR_CONFIGURED`: User has configured the PTR. + - `VALIDATED`: Reverse DNS lookup is successful. + - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. + - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being + configured. + - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. + - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. """ @@ -100353,14 +114300,41 @@ class ByoipApiVersion(proto.Enum): V1 = 2715 V2 = 2716 + class Ipv6AccessType(proto.Enum): + r"""The internet access type for IPv6 Public Advertised Prefixes. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + Default IPv6 access type. The prefix will be + announced to the internet. All children Public + Delegated Prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The prefix will not be announced to the + internet. Prefix will be used privately within + Cloud. All children Public Delegated Prefixes + will have IPv6 access type as INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class PdpScope(proto.Enum): r"""Specifies how child public delegated prefix will be scoped. It could - be one of following values: - ``REGIONAL``: The public delegated - prefix is regional only. The provisioning will take a few minutes. - - ``GLOBAL``: The public delegated prefix is global only. The - provisioning will take ~4 weeks. - ``GLOBAL_AND_REGIONAL`` [output - only]: The public delegated prefixes is BYOIP V1 legacy prefix. This - is output only value and no longer supported in BYOIP V2. + be one of following values: + + :: + + - `REGIONAL`: The public delegated prefix is regional only. The + provisioning will take a few minutes. + - `GLOBAL`: The public delegated prefix is global only. The + provisioning will take ~4 weeks. + - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is + BYOIP V1 legacy prefix. This is output only value and no longer + supported in BYOIP V2. Values: UNDEFINED_PDP_SCOPE (0): @@ -100384,13 +114358,17 @@ class PdpScope(proto.Enum): class Status(proto.Enum): r"""The status of the public advertised prefix. Possible values include: - - ``INITIAL``: RPKI validation is complete. - ``PTR_CONFIGURED``: - User has configured the PTR. - ``VALIDATED``: Reverse DNS lookup is - successful. - ``REVERSE_DNS_LOOKUP_FAILED``: Reverse DNS lookup - failed. - ``PREFIX_CONFIGURATION_IN_PROGRESS``: The prefix is being - configured. - ``PREFIX_CONFIGURATION_COMPLETE``: The prefix is fully - configured. - ``PREFIX_REMOVAL_IN_PROGRESS``: The prefix is being - removed. + + :: + + - `INITIAL`: RPKI validation is complete. + - `PTR_CONFIGURED`: User has configured the PTR. + - `VALIDATED`: Reverse DNS lookup is successful. + - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. + - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being + configured. + - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. + - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. Values: UNDEFINED_STATUS (0): @@ -100462,6 +114440,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) kind: str = proto.Field( proto.STRING, number=3292052, @@ -100515,15 +114498,15 @@ class PublicAdvertisedPrefixList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.PublicAdvertisedPrefix]): A list of PublicAdvertisedPrefix resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicAdvertisedPrefix for public advertised + [Output Only] Type of the resource. + Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -100605,10 +114588,11 @@ class PublicAdvertisedPrefixPublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_region``. status (str): The status of the public delegated prefix. - Possible values are: INITIALIZING: The public + Possible values are: INITIALIZING: The public delegated prefix is being initialized and - addresses cannot be created yet. ANNOUNCED: The - public delegated prefix is active. + addresses cannot be created yet. + ANNOUNCED: The public delegated prefix is + active. This field is a member of `oneof`_ ``_status``. """ @@ -100666,7 +114650,7 @@ class PublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_byoip_api_version``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -100686,11 +114670,12 @@ class PublicDelegatedPrefix(proto.Message): used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint - must be provided in order to update the - PublicDelegatedPrefix, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve a PublicDelegatedPrefix. + must be provided in order to update + thePublicDelegatedPrefix, otherwise the request + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a PublicDelegatedPrefix. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -100703,13 +114688,20 @@ class PublicDelegatedPrefix(proto.Message): represented by this public delegated prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + [Output Only] The internet access type for IPv6 Public + Delegated Prefixes. Inherited from parent prefix. Check the + Ipv6AccessType enum for the list of possible values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. is_live_migration (bool): If true, the prefix will be live migrated. This field is a member of `oneof`_ ``_is_live_migration``. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefix for public delegated prefixes. + [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefix for public delegated + prefixes. This field is a member of `oneof`_ ``_kind``. mode (str): @@ -100721,7 +114713,7 @@ class PublicDelegatedPrefix(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -100751,14 +114743,20 @@ class PublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): [Output Only] The status of the public delegated prefix, - which can be one of following values: - ``INITIALIZING`` The - public delegated prefix is being initialized and addresses - cannot be created yet. - ``READY_TO_ANNOUNCE`` The public - delegated prefix is a live migration prefix and is active. - - ``ANNOUNCED`` The public delegated prefix is announced and - ready to use. - ``DELETING`` The public delegated prefix is - being deprovsioned. Check the Status enum for the list of - possible values. + which can be one of following values: + + :: + + - `INITIALIZING` The public delegated prefix is being initialized and + addresses cannot be created yet. + - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration + prefix and is active. + - `ANNOUNCED` The public delegated prefix is announced and ready to + use. + - `DELETING` The public delegated prefix is being deprovsioned. + - `ACTIVE` The public delegated prefix is ready to use. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. """ @@ -100784,6 +114782,30 @@ class ByoipApiVersion(proto.Enum): V1 = 2715 V2 = 2716 + class Ipv6AccessType(proto.Enum): + r"""[Output Only] The internet access type for IPv6 Public Delegated + Prefixes. Inherited from parent prefix. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + The parent public advertised prefix will be + announced to the internet. All children public + delegated prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The parent public advertised prefix will not + be announced to the internet. Prefix will be + used privately within Cloud. All children public + delegated prefixes will have IPv6 access type as + INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class Mode(proto.Enum): r"""The public delegated prefix mode for IPv6 only. @@ -100798,30 +114820,50 @@ class Mode(proto.Enum): EXTERNAL_IPV6_FORWARDING_RULE_CREATION (398684356): The public delegated prefix is used for creating forwarding rules only. Such prefixes - cannot set publicDelegatedSubPrefixes. + cannot set publicDelegatedSubPrefixes. Parent + public delegated prefix must have IPv6 access + type as EXTERNAL. EXTERNAL_IPV6_SUBNETWORK_CREATION (61198284): The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + Parent public delegated prefix must have IPv6 + access type as EXTERNAL. + INTERNAL_IPV6_SUBNETWORK_CREATION (153239834): + The public delegated prefix is used for + creating dual stack or IPv6-only subnetwork with + internal access only. Such prefixes cannot set + publicDelegatedSubPrefixes and + allocatablePrefixLength. Parent public delegated + prefix must have IPv6 access type as INTERNAL. """ UNDEFINED_MODE = 0 DELEGATION = 264149288 EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 + INTERNAL_IPV6_SUBNETWORK_CREATION = 153239834 class Status(proto.Enum): r"""[Output Only] The status of the public delegated prefix, which can - be one of following values: - ``INITIALIZING`` The public delegated - prefix is being initialized and addresses cannot be created yet. - - ``READY_TO_ANNOUNCE`` The public delegated prefix is a live - migration prefix and is active. - ``ANNOUNCED`` The public delegated - prefix is announced and ready to use. - ``DELETING`` The public - delegated prefix is being deprovsioned. + be one of following values: + + :: + + - `INITIALIZING` The public delegated prefix is being initialized and + addresses cannot be created yet. + - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration + prefix and is active. + - `ANNOUNCED` The public delegated prefix is announced and ready to + use. + - `DELETING` The public delegated prefix is being deprovsioned. + - `ACTIVE` The public delegated prefix is ready to use. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. + ACTIVE (314733318): + The public delegated prefix is ready to use. ANNOUNCED (365103355): The public delegated prefix is announced and ready to use. @@ -100842,6 +114884,7 @@ class Status(proto.Enum): withdrawn but ready to be announced. """ UNDEFINED_STATUS = 0 + ACTIVE = 314733318 ANNOUNCED = 365103355 ANNOUNCED_TO_GOOGLE = 454875705 ANNOUNCED_TO_INTERNET = 177880897 @@ -100889,6 +114932,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) is_live_migration: bool = proto.Field( proto.BOOL, number=511823856, @@ -100953,15 +115001,15 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): A list of PublicDelegatedPrefixesScopedList resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefixAggregatedList for aggregated - lists of public delegated prefixes. + [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefixAggregatedList for + aggregated lists of public delegated prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -101035,15 +115083,15 @@ class PublicDelegatedPrefixList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.PublicDelegatedPrefix]): A list of PublicDelegatedPrefix resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefixList for public delegated + [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefixList for public delegated prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -101128,6 +115176,12 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix(proto.Message): represented by this sub public delegated prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + [Output Only] The internet access type for IPv6 Public + Delegated Sub Prefixes. Inherited from parent prefix. Check + the Ipv6AccessType enum for the list of possible values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. is_address (bool): Whether the sub prefix is delegated to create Address resources in the delegatee project. @@ -101155,6 +115209,30 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix(proto.Message): This field is a member of `oneof`_ ``_status``. """ + class Ipv6AccessType(proto.Enum): + r"""[Output Only] The internet access type for IPv6 Public Delegated Sub + Prefixes. Inherited from parent prefix. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + The parent public advertised prefix will be + announced to the internet. All children public + delegated prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The parent public advertised prefix will not + be announced to the internet. Prefix will be + used privately within Cloud. All children public + delegated prefixes will have IPv6 access type as + INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class Mode(proto.Enum): r"""The PublicDelegatedSubPrefix mode for IPv6 only. @@ -101169,16 +115247,28 @@ class Mode(proto.Enum): EXTERNAL_IPV6_FORWARDING_RULE_CREATION (398684356): The public delegated prefix is used for creating forwarding rules only. Such prefixes - cannot set publicDelegatedSubPrefixes. + cannot set publicDelegatedSubPrefixes. Parent + public delegated prefix must have IPv6 access + type as EXTERNAL. EXTERNAL_IPV6_SUBNETWORK_CREATION (61198284): The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + Parent public delegated prefix must have IPv6 + access type as EXTERNAL. + INTERNAL_IPV6_SUBNETWORK_CREATION (153239834): + The public delegated prefix is used for + creating dual stack or IPv6-only subnetwork with + internal access only. Such prefixes cannot set + publicDelegatedSubPrefixes and + allocatablePrefixLength. Parent public delegated + prefix must have IPv6 access type as INTERNAL. """ UNDEFINED_MODE = 0 DELEGATION = 264149288 EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 + INTERNAL_IPV6_SUBNETWORK_CREATION = 153239834 class Status(proto.Enum): r"""[Output Only] The status of the sub public delegated prefix. @@ -101221,6 +115311,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) is_address: bool = proto.Field( proto.BOOL, number=352617951, @@ -101845,7 +115940,7 @@ class QuotaExceededInfo(proto.Message): The map holding related quota dimensions. future_limit (float): Future quota limit being rolled out. The - limit's unit depends on the quota type or + limit's unit depends on the quota type or metric. This field is a member of `oneof`_ ``_future_limit``. @@ -101938,8 +116033,9 @@ class QuotaStatusWarning(proto.Message): This field is a member of `oneof`_ ``_code``. data (MutableSequence[google.cloud.compute_v1beta.types.Data]): [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } message (str): [Output Only] A human-readable description of the warning code. @@ -102103,8 +116199,8 @@ class RawDisk(proto.Message): Attributes: container_type (str): The format used to encode and transmit the - block device, which should be TAR. This is just - a container and transmission format and not a + block device, which should beTAR. This is just a + container and transmission format and not a runtime format. Provided by the client when the disk image is created. Check the ContainerType enum for the list of possible values. @@ -102119,20 +116215,29 @@ class RawDisk(proto.Message): source (str): The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the - URL: - - https://storage.googleapis.com/bucket_name/image_archive_name - - https://storage.googleapis.com/bucket_name/folder_name/ - image_archive_name In order to create an image, you must - provide the full or partial URL of one of the following: - - The rawDisk.source URL - The sourceDisk URL - The - sourceImage URL - The sourceSnapshot URL + URL: + + :: + + - https://storage.googleapis.com/bucket_name/image_archive_name + - https://storage.googleapis.com/bucket_name/folder_name/image_archive_name + + In order to create an image, you must provide the full or + partial URL of one of the following: + + :: + + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL This field is a member of `oneof`_ ``_source``. """ class ContainerType(proto.Enum): r"""The format used to encode and transmit the block device, - which should be TAR. This is just a container and transmission + which should beTAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. @@ -102183,21 +116288,25 @@ class RecreateInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -102247,17 +116356,21 @@ class RecreateInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -102299,7 +116412,11 @@ class Reference(proto.Message): This field is a member of `oneof`_ ``_kind``. reference_type (str): A description of the reference type with no implied - semantics. Possible values include: 1. MEMBER_OF + semantics. Possible values include: + + :: + + 1. MEMBER_OF This field is a member of `oneof`_ ``_reference_type``. referrer (str): @@ -102337,8 +116454,10 @@ class Reference(proto.Message): class Region(proto.Message): - r"""Represents a Region resource. A region is a geographical area - where a resource is located. For more information, read Regions + r"""Represents a Region resource. + + A region is a geographical area where a resource is located. For + more information, readRegions and Zones. @@ -102346,7 +116465,7 @@ class Region(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -102385,7 +116504,7 @@ class Region(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): - [Output Only] Status of the region, either UP or DOWN. Check + [Output Only] Status of the region, either UP orDOWN. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -102399,7 +116518,7 @@ class Region(proto.Message): """ class Status(proto.Enum): - r"""[Output Only] Status of the region, either UP or DOWN. + r"""[Output Only] Status of the region, either UP orDOWN. Values: UNDEFINED_STATUS (0): @@ -102492,13 +116611,16 @@ class RegionAddressesMoveRequest(proto.Message): The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a - address: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /addresses/address - - projects/project/regions/region/addresses/address + address: + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address + - + projects/project/regions/region/addresses/address + Note that destination project must be different - from the source project. So - /regions/region/addresses/address is not valid + from the source project. + So/regions/region/addresses/address is not valid partial url. This field is a member of `oneof`_ ``_destination_address``. @@ -102536,7 +116658,7 @@ class RegionAutoscalerList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -102619,14 +116741,14 @@ class RegionDiskTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): A list of DiskType resources. kind (str): - [Output Only] Type of resource. Always - compute#regionDiskTypeList for region disk types. + [Output Only] Type of resource. + Alwayscompute#regionDiskTypeList for region disk types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -102738,15 +116860,26 @@ class RegionDisksStartAsyncReplicationRequest(proto.Message): The secondary disk to start asynchronous replication to. You can provide this as a partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + example, the following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk + + - + projects/project/zones/zone/disks/disk + + - + projects/project/regions/region/disks/disk + + - + zones/zone/disks/disk + + - + regions/region/disks/disk This field is a member of `oneof`_ ``_async_secondary_disk``. """ @@ -102778,7 +116911,7 @@ class RegionInstanceGroupList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -102869,7 +117002,7 @@ class RegionInstanceGroupManagerList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -102955,15 +117088,15 @@ class RegionInstanceGroupManagerResizeRequestsListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): A list of Resize Request resources. kind (str): - [Output Only] Type of the resource. Always - compute#regionInstanceGroupManagerResizeRequestList for a - list of Resize Requests. + [Output Only] Type of the resource. + Alwayscompute#regionInstanceGroupManagerResizeRequestList + for a list of Resize Requests. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -103076,45 +117209,67 @@ class RegionInstanceGroupManagersApplyUpdatesRequest(proto.Message): instances (MutableSequence[str]): The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial - URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + URL, such aszones/[ZONE]/instances/[INSTANCE_NAME]. minimal_action (str): The minimal action that you want to perform - on each instance during the update: - REPLACE: - At minimum, delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - minimum action is NONE. If your update requires - a more disruptive action than you set with this - flag, the necessary action is performed to - execute the update. Check the MinimalAction enum - for the list of possible values. + on each instance during the update: + + + - REPLACE: At minimum, delete the instance + and create it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + + By default, the minimum action is NONE. If your + update requires a more disruptive action than + you set with this flag, the necessary action is + performed to execute the update. Check the + MinimalAction enum for the list of possible + values. This field is a member of `oneof`_ ``_minimal_action``. most_disruptive_allowed_action (str): The most disruptive action that you want to - perform on each instance during the update: - - REPLACE: Delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - most disruptive allowed action is REPLACE. If - your update requires a more disruptive action - than you set with this flag, the update request - will fail. Check the MostDisruptiveAllowedAction - enum for the list of possible values. + perform on each instance during the update: + + + - REPLACE: Delete the instance and create + it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and + limit disruption as much as possible. + - NONE: Do not disrupt the + instance at all. + + By default, the most disruptive allowed action + is REPLACE. If your update requires a more + disruptive action than you set with this flag, + the update request will fail. + Check the MostDisruptiveAllowedAction enum for + the list of possible values. This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. """ class MinimalAction(proto.Enum): r"""The minimal action that you want to perform on each instance - during the update: - REPLACE: At minimum, delete the instance - and create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. + during the update: + + + - REPLACE: At minimum, delete the instance and create it + again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update. Additional @@ -103135,15 +117290,21 @@ class MinimalAction(proto.Enum): class MostDisruptiveAllowedAction(proto.Enum): r"""The most disruptive action that you want to perform on each - instance during the update: - REPLACE: Delete the instance and - create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. + instance during the update: + + + - REPLACE: Delete the instance and create it again. + - RESTART: Stop the instance and start it again. + - REFRESH: Do not stop the instance and limit disruption + as much as possible. + - NONE: Do not disrupt the + instance at all. + By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with - this flag, the update request will fail. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + this flag, the update request will fail. + Additional supported values which may be not listed in the enum + directly due to technical reasons: NONE REFRESH @@ -103240,7 +117401,7 @@ class RegionInstanceGroupManagersListErrorsResponse(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -103275,7 +117436,7 @@ class RegionInstanceGroupManagersListInstanceConfigsResp(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -103320,7 +117481,7 @@ class RegionInstanceGroupManagersListInstancesResponse(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -103375,20 +117536,25 @@ class RegionInstanceGroupManagersResizeAdvancedRequest(proto.Message): we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously - until it succeeds. This flag matters only in the - first attempt of creation of an instance. After - an instance is successfully created while this - flag is enabled, the instance behaves the same - way as all the other instances created with a - regular resize request. In particular, if a - running instance dies unexpectedly at a later - time and needs to be recreated, this mode does - not affect the recreation behavior in that - scenario. This flag is applicable only to the - current resize request. It does not influence - other resize requests in any way. You can see - which instances ar being created in which mode - by calling the get or listManagedInstances API. + until it succeeds. + + This flag matters only in the first attempt of + creation of an instance. After an instance is + successfully created while this flag is enabled, + the instance behaves the same way as all the + other instances created with a regular resize + request. In particular, if a running instance + dies unexpectedly at a later time and needs to + be recreated, this mode does not affect the + recreation behavior in that scenario. + + This flag is applicable only to the current + resize request. It does not influence other + resize requests in any way. + + You can see which instances ar being created in + which mode by calling the get or + listManagedInstances API. This field is a member of `oneof`_ ``_no_creation_retries``. target_size (int): @@ -103461,7 +117627,7 @@ class RegionInstanceGroupManagersSetTargetPoolsRequest(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. target_pools (MutableSequence[str]): The URL of all TargetPool resources to which - instances in the instanceGroup field are added. + instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. """ @@ -103591,7 +117757,7 @@ class RegionInstanceGroupsListInstances(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -103661,8 +117827,8 @@ class RegionInstanceGroupsListInstancesRequest(proto.Message): Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, - all the named ports will be returned. Always - lists all instances. + all the named ports will be returned. + Always lists all instances. This field is a member of `oneof`_ ``_port_name``. """ @@ -103709,8 +117875,8 @@ class RegionInstanceGroupsSetNamedPortsRequest(proto.Message): information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings - concurrently. Obtain the fingerprint with the - instanceGroups.get method. Then, include the + concurrently. Obtain the fingerprint with + theinstanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. @@ -103754,7 +117920,7 @@ class RegionList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -104093,17 +118259,21 @@ class RemoveAssociationFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104146,17 +118316,21 @@ class RemoveAssociationNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104199,17 +118373,21 @@ class RemoveAssociationOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -104257,17 +118435,21 @@ class RemoveAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104322,17 +118504,21 @@ class RemoveAssociationRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104378,17 +118564,21 @@ class RemoveHealthCheckTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -104439,17 +118629,21 @@ class RemoveInstanceTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -104503,22 +118697,26 @@ class RemoveInstancesInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -104566,17 +118764,21 @@ class RemovePacketMirroringRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104620,17 +118822,21 @@ class RemovePacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104675,17 +118881,21 @@ class RemovePeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104731,17 +118941,21 @@ class RemoveResourcePoliciesDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -104791,17 +119005,21 @@ class RemoveResourcePoliciesInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -104853,17 +119071,21 @@ class RemoveResourcePoliciesRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104912,17 +119134,21 @@ class RemoveRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -104965,17 +119191,21 @@ class RemoveRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -105019,17 +119249,21 @@ class RemoveRuleOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -105077,17 +119311,21 @@ class RemoveRuleRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -105216,17 +119454,21 @@ class RemoveTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -105274,22 +119516,27 @@ class ReportFaultyReservationSubBlockRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. reservation_sub_blocks_report_faulty_request_resource (google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequest): The body resource for this request zone (str): @@ -105344,17 +119591,21 @@ class ReportHostAsFaultyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -105390,7 +119641,7 @@ class RequestMirrorPolicy(proto.Message): backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host - or authority header is suffixed with -shadow. + or authority header is suffixed with-shadow. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -105398,10 +119649,13 @@ class RequestMirrorPolicy(proto.Message): Attributes: backend_service (str): The full or partial URL to the BackendService - resource being mirrored to. The backend service - configured for a mirroring policy must reference - backends that are of the same type as the - original backend service matched in the URL map. + resource being mirrored to. + + The backend service configured for a mirroring + policy must reference backends that are of the + same type as the original backend service + matched in the URL map. + Serverless NEG backends are not currently supported as a mirrored backend service. @@ -105445,17 +119699,21 @@ class RequestRemovePeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -105481,9 +119739,9 @@ class RequestRemovePeeringNetworkRequest(proto.Message): class Reservation(proto.Message): - r"""Represents a reservation resource. A reservation ensures that - capacity is held in a specific zone even if the reserved VMs are - not running. For more information, read Reserving zonal + r"""Represents a reservation resource. A reservation ensures + that capacity is held in a specific zone even if the reserved + VMs are not running. For more information, read Reserving zonal resources. @@ -105508,7 +119766,7 @@ class Reservation(proto.Message): This field is a member of `oneof`_ ``_commitment``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. delete_after_duration (google.cloud.compute_v1beta.types.Duration): @@ -105519,8 +119777,8 @@ class Reservation(proto.Message): This field is a member of `oneof`_ ``_delete_after_duration``. delete_at_time (str): Absolute time in future when the reservation - will be auto-deleted by Compute Engine. - Timestamp is represented in RFC3339 text format. + will be auto-deleted by Compute Engine. + Timestamp is represented inRFC3339 text format. This field is a member of `oneof`_ ``_delete_at_time``. deployment_type (str): @@ -105547,8 +119805,8 @@ class Reservation(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#reservations for reservations. + [Output Only] Type of the resource. + Alwayscompute#reservations for reservations. This field is a member of `oneof`_ ``_kind``. linked_commitments (MutableSequence[str]): @@ -105558,7 +119816,7 @@ class Reservation(proto.Message): name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -105570,9 +119828,9 @@ class Reservation(proto.Message): Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. - power and/or cooling failures). Check the - ProtectionTier enum for the list of possible - values. + power and/or cooling failures). + Check the ProtectionTier enum for the list of + possible values. This field is a member of `oneof`_ ``_protection_tier``. reservation_mode (str): @@ -105633,13 +119891,18 @@ class Reservation(proto.Message): This field is a member of `oneof`_ ``_specific_reservation_required``. status (str): - [Output Only] The status of the reservation. - CREATING: - Reservation resources are being allocated. - READY: - Reservation resources have been allocated, and the - reservation is ready for use. - DELETING: Reservation - deletion is in progress. - UPDATING: Reservation update is - in progress. Check the Status enum for the list of possible - values. + [Output Only] The status of the reservation. + + :: + + - CREATING: Reservation resources are being + allocated. + - READY: Reservation resources have been allocated, + and the reservation is ready for use. + - DELETING: Reservation deletion is in progress. + - UPDATING: Reservation update is in progress. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. zone (str): @@ -105752,11 +120015,16 @@ class SchedulingType(proto.Enum): INDEPENDENT = 127011674 class Status(proto.Enum): - r"""[Output Only] The status of the reservation. - CREATING: Reservation - resources are being allocated. - READY: Reservation resources have - been allocated, and the reservation is ready for use. - DELETING: - Reservation deletion is in progress. - UPDATING: Reservation update - is in progress. + r"""[Output Only] The status of the reservation. + + :: + + - CREATING: Reservation resources are being + allocated. + - READY: Reservation resources have been allocated, + and the reservation is ready for use. + - DELETING: Reservation deletion is in progress. + - UPDATING: Reservation update is in progress. Values: UNDEFINED_STATUS (0): @@ -105976,17 +120244,17 @@ class ReservationAffinity(proto.Message): Attributes: consume_reservation_type (str): Specifies the type of reservation from which this instance - can consume resources: ANY_RESERVATION (default), - SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming - reserved instances for examples. Check the + can consume resources: ANY_RESERVATION + (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See + Consuming reserved instances for examples. Check the ConsumeReservationType enum for the list of possible values. This field is a member of `oneof`_ ``_consume_reservation_type``. key (str): Corresponds to the label key of a reservation resource. To - target a SPECIFIC_RESERVATION by name, specify - googleapis.com/reservation-name as the key and specify the - name of your reservation as its value. + target aSPECIFIC_RESERVATION by name, + specifygoogleapis.com/reservation-name as the key and + specify the name of your reservation as its value. This field is a member of `oneof`_ ``_key``. values (MutableSequence[str]): @@ -106000,7 +120268,7 @@ class ReservationAffinity(proto.Message): class ConsumeReservationType(proto.Enum): r"""Specifies the type of reservation from which this instance can - consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, + consume resources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples. Values: @@ -106074,7 +120342,7 @@ class ReservationAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -106146,7 +120414,7 @@ class ReservationBlock(proto.Message): This field is a member of `oneof`_ ``_count``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. health_info (google.cloud.compute_v1beta.types.ReservationBlockHealthInfo): @@ -106170,8 +120438,8 @@ class ReservationBlock(proto.Message): This field is a member of `oneof`_ ``_in_use_host_count``. kind (str): - [Output Only] Type of the resource. Always - compute#reservationBlock for reservation blocks. + [Output Only] Type of the resource. + Alwayscompute#reservationBlock for reservation blocks. This field is a member of `oneof`_ ``_kind``. name (str): @@ -106532,15 +120800,15 @@ class ReservationBlocksListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlock]): A list of reservation block resources. kind (str): - Type of the resource. Always - compute#reservationBlock for a list of + Type of the resource. + Alwayscompute#reservationBlock for a list of reservation blocks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): This token allows you to get the next page of results for list requests. If the number of - results is larger than maxResults, use the + results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken @@ -106615,7 +120883,7 @@ class ReservationList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -106674,13 +120942,17 @@ class ReservationSubBlock(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + accelerator_topologies_info (google.cloud.compute_v1beta.types.AcceleratorTopologiesInfo): + [Output Only] Slice info for the reservation subBlock. + + This field is a member of `oneof`_ ``_accelerator_topologies_info``. count (int): [Output Only] The number of hosts that are allocated in this reservation subBlock. This field is a member of `oneof`_ ``_count``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. health_info (google.cloud.compute_v1beta.types.ReservationSubBlockHealthInfo): @@ -106705,8 +120977,8 @@ class ReservationSubBlock(proto.Message): This field is a member of `oneof`_ ``_in_use_host_count``. kind (str): - [Output Only] Type of the resource. Always - compute#reservationSubBlock for reservation subBlocks. + [Output Only] Type of the resource. + Alwayscompute#reservationSubBlock for reservation subBlocks. This field is a member of `oneof`_ ``_kind``. name (str): @@ -106773,6 +121045,12 @@ class Status(proto.Enum): INVALID = 530283991 READY = 77848963 + accelerator_topologies_info: "AcceleratorTopologiesInfo" = proto.Field( + proto.MESSAGE, + number=84833420, + optional=True, + message="AcceleratorTopologiesInfo", + ) count: int = proto.Field( proto.INT32, number=94851343, @@ -107001,15 +121279,15 @@ class ReservationSubBlocksListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ReservationSubBlock]): A list of reservation subBlock resources. kind (str): - Type of the resource. Always - compute#reservationSubBlock for a list of + Type of the resource. + Alwayscompute#reservationSubBlock for a list of reservation subBlocks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): This token allows you to get the next page of results for list requests. If the number of - results is larger than maxResults, use the + results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken @@ -107172,6 +121450,9 @@ class Behavior(proto.Enum): The subBlock experienced a GPU error. PERFORMANCE (135701520): The subBlock experienced performance issues. + SILENT_DATA_CORRUPTION (111360678): + The subBlock experienced silent data + corruption. SWITCH_FAILURE (254909279): The subBlock experienced a switch failure. """ @@ -107179,6 +121460,7 @@ class Behavior(proto.Enum): FAULT_BEHAVIOR_UNSPECIFIED = 447660743 GPU_ERROR = 198817909 PERFORMANCE = 135701520 + SILENT_DATA_CORRUPTION = 111360678 SWITCH_FAILURE = 254909279 behavior: str = proto.Field( @@ -107363,17 +121645,21 @@ class ResetInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -107418,21 +121704,25 @@ class ResizeAdvancedInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -107470,15 +121760,15 @@ class ResizeAdvancedRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - must be a string that meets the requirements in - RFC1035. + The name of the managed instance group. + It must be a string that meets the requirements + in RFC1035. project (str): Project ID for this request. region (str): - Name of the region scoping this request. It - must be a string that meets the requirements in - RFC1035. + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. region_instance_group_managers_resize_advanced_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest): The body resource for this request request_id (str): @@ -107486,17 +121776,21 @@ class ResizeAdvancedRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -107544,17 +121838,21 @@ class ResizeDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -107602,17 +121900,21 @@ class ResizeInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. size (int): @@ -107622,7 +121924,7 @@ class ResizeInstanceGroupManagerRequest(proto.Message): removes instances to maintain the number of instances specified by this parameter. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -107670,17 +121972,21 @@ class ResizeRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -107728,17 +122034,21 @@ class ResizeRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. size (int): @@ -107784,17 +122094,21 @@ class ResizeReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): @@ -107846,32 +122160,52 @@ class ResourceCommitment(proto.Message): amount (int): The quantity of the hardware resource that you want to commit to purchasing (in a - type-dependent unit). - For vCPUs, you must - specify an integer value. - For memory, you - specify the amount of MB that you want. The - value you specify must be a multiple of 256 MB, - with up to 6.5 GB of memory per every vCPU. - - For GPUs, you must specify an integer value. - - For Local SSD disks, you must specify the amount - in GB. The size of a single Local SSD disk is - 375 GB. + type-dependent unit). + + - For vCPUs, you must specify an integer + value. + - For memory, you specify the amount of MB + that you want. The value you specify must + be a multiple of 256 MB, with up to 6.5 GB of + memory per every vCPU. + - For GPUs, you must specify an integer + value. + - For Local SSD disks, you must specify the + amount in GB. The size of a single Local + SSD disk is 375 GB. This field is a member of `oneof`_ ``_amount``. type_ (str): The type of hardware resource that you want to specify. You - can specify any of the following values: - VCPU - MEMORY - - LOCAL_SSD - ACCELERATOR Specify as a separate entry in the - list for each individual resource type. Check the Type enum - for the list of possible values. + can specify any of the following values: + + :: + + - VCPU + - MEMORY + - LOCAL_SSD + - ACCELERATOR + + Specify as a separate entry in the list for each individual + resource type. Check the Type enum for the list of possible + values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): r"""The type of hardware resource that you want to specify. You can - specify any of the following values: - VCPU - MEMORY - LOCAL_SSD - - ACCELERATOR Specify as a separate entry in the list for each - individual resource type. + specify any of the following values: + + :: + + - VCPU + - MEMORY + - LOCAL_SSD + - ACCELERATOR + + Specify as a separate entry in the list for each individual resource + type. Values: UNDEFINED_TYPE (0): @@ -107965,7 +122299,7 @@ class ResourcePoliciesScopedList(proto.Message): class ResourcePolicy(proto.Message): r"""Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. - For example, you can use them to schedule persistent disk + For example, you can use them toschedule persistent disk snapshots. @@ -107973,7 +122307,7 @@ class ResourcePolicy(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -107999,14 +122333,14 @@ class ResourcePolicy(proto.Message): This field is a member of `oneof`_ ``_instance_schedule_policy``. kind (str): - [Output Only] Type of the resource. Always - compute#resource_policies for resource policies. + [Output Only] Type of the resource. + Alwayscompute#resource_policies for resource policies. This field is a member of `oneof`_ ``_kind``. name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -108172,7 +122506,7 @@ class ResourcePolicyAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -108258,7 +122592,7 @@ class ResourcePolicyDailyCycle(proto.Message): start_time (str): Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, - 08:00, 12:00, 16:00, or 20:00. For example, both + 08:00,12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. This field is a member of `oneof`_ ``_start_time``. @@ -108293,6 +122627,13 @@ class ResourcePolicyGroupPlacementPolicy(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + accelerator_topology_mode (str): + Specifies the connection mode for the accelerator topology. + If not specified, the default is AUTO_CONNECT. Check the + AcceleratorTopologyMode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_accelerator_topology_mode``. availability_domain_count (int): The number of availability domains to spread instances across. If two instances are in @@ -108334,6 +122675,26 @@ class ResourcePolicyGroupPlacementPolicy(proto.Message): This field is a member of `oneof`_ ``_vm_count``. """ + class AcceleratorTopologyMode(proto.Enum): + r"""Specifies the connection mode for the accelerator topology. If not + specified, the default is AUTO_CONNECT. + + Values: + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE (0): + A value indicating that the enum field is not + set. + AUTO_CONNECT (491872826): + The interconnected chips are pre-configured + at the time of VM creation. + PROVISION_ONLY (399134966): + The interconnected chips are connected on + demand. At the time of VM creation, the chips + are not connected. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE = 0 + AUTO_CONNECT = 491872826 + PROVISION_ONLY = 399134966 + class Collocation(proto.Enum): r"""Specifies network collocation @@ -108350,6 +122711,11 @@ class Collocation(proto.Enum): COLLOCATED = 103257554 UNSPECIFIED_COLLOCATION = 464308205 + accelerator_topology_mode: str = proto.Field( + proto.STRING, + number=284293791, + optional=True, + ) availability_domain_count: int = proto.Field( proto.INT32, number=12453432, @@ -108531,14 +122897,15 @@ class ResourcePolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicy]): [Output Only] A list of ResourcePolicy resources. kind (str): - [Output Only] Type of resource.Always - compute#resourcePoliciesList for listsof resourcePolicies + [Output Only] Type of + resource.Alwayscompute#resourcePoliciesList for listsof + resourcePolicies This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -108597,10 +122964,11 @@ def raw_page(self): class ResourcePolicyResourceStatus(proto.Message): - r"""Contains output only fields. Use this sub-message for all - output fields set on ResourcePolicy. The internal structure of - this "status" field should mimic the structure of ResourcePolicy - proto specification. + r"""Contains output only fields. + Use this sub-message for all output fields set on + ResourcePolicy. The internal structure of this "status" field + should mimic the structure of ResourcePolicy proto + specification. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -108719,9 +123087,9 @@ class ResourcePolicySnapshotSchedulePolicyRetentionPolicy(proto.Message): This field is a member of `oneof`_ ``_max_retention_days``. on_source_disk_delete (str): Specifies the behavior to apply to scheduled - snapshots when the source disk is deleted. Check - the OnSourceDiskDelete enum for the list of - possible values. + snapshots when the source disk is deleted. + Check the OnSourceDiskDelete enum for the list + of possible values. This field is a member of `oneof`_ ``_on_source_disk_delete``. """ @@ -108880,10 +123248,11 @@ class ResourcePolicyWeeklyCycleDayOfWeek(proto.Message): day (str): Defines a schedule that runs on specific days of the week. Specify one or more days. The - following options are available: MONDAY, - TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, - SUNDAY. Check the Day enum for the list of - possible values. + following options are available: + + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, + SATURDAY, SUNDAY. Check the Day enum for the + list of possible values. This field is a member of `oneof`_ ``_day``. duration (str): @@ -108901,6 +123270,7 @@ class ResourcePolicyWeeklyCycleDayOfWeek(proto.Message): class Day(proto.Enum): r"""Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. Values: @@ -108962,6 +123332,13 @@ class ResourcePolicyWorkloadPolicy(proto.Message): partition for VMs that have interconnected GPUs. This field is a member of `oneof`_ ``_accelerator_topology``. + accelerator_topology_mode (str): + Specifies the connection mode for the accelerator topology. + If not specified, the default is AUTO_CONNECT. Check the + AcceleratorTopologyMode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_accelerator_topology_mode``. max_topology_distance (str): Specifies the maximum distance between instances. Check the MaxTopologyDistance enum @@ -108976,6 +123353,26 @@ class ResourcePolicyWorkloadPolicy(proto.Message): This field is a member of `oneof`_ ``_type``. """ + class AcceleratorTopologyMode(proto.Enum): + r"""Specifies the connection mode for the accelerator topology. If not + specified, the default is AUTO_CONNECT. + + Values: + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE (0): + A value indicating that the enum field is not + set. + AUTO_CONNECT (491872826): + The interconnected chips are pre-configured + at the time of VM creation. + PROVISION_ONLY (399134966): + The interconnected chips are connected on + demand. At the time of VM creation, the chips + are not connected. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE = 0 + AUTO_CONNECT = 491872826 + PROVISION_ONLY = 399134966 + class MaxTopologyDistance(proto.Enum): r"""Specifies the maximum distance between instances. @@ -109018,6 +123415,11 @@ class Type(proto.Enum): number=389323203, optional=True, ) + accelerator_topology_mode: str = proto.Field( + proto.STRING, + number=284293791, + optional=True, + ) max_topology_distance: str = proto.Field( proto.STRING, number=7521706, @@ -109031,9 +123433,10 @@ class Type(proto.Enum): class ResourceStatus(proto.Message): - r"""Contains output only fields. Use this sub-message for actual - values set on Instance attributes as compared to the value - requested by the user (intent) in their instance CRUD calls. + r"""Contains output only fields. + Use this sub-message for actual values set on Instance + attributes as compared to the value requested by the user + (intent) in their instance CRUD calls. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -109061,6 +123464,11 @@ class ResourceStatus(proto.Message): located. This field is a member of `oneof`_ ``_physical_host_topology``. + reservation_consumption_info (google.cloud.compute_v1beta.types.ResourceStatusReservationConsumptionInfo): + [Output Only] Reservation information that the instance is + consuming from. + + This field is a member of `oneof`_ ``_reservation_consumption_info``. scheduling (google.cloud.compute_v1beta.types.ResourceStatusScheduling): This field is a member of `oneof`_ ``_scheduling``. @@ -109092,6 +123500,14 @@ class ResourceStatus(proto.Message): optional=True, message="ResourceStatusPhysicalHostTopology", ) + reservation_consumption_info: "ResourceStatusReservationConsumptionInfo" = ( + proto.Field( + proto.MESSAGE, + number=201056997, + optional=True, + message="ResourceStatusReservationConsumptionInfo", + ) + ) scheduling: "ResourceStatusScheduling" = proto.Field( proto.MESSAGE, number=386688404, @@ -109257,6 +123673,28 @@ class ResourceStatusPhysicalHostTopology(proto.Message): ) +class ResourceStatusReservationConsumptionInfo(proto.Message): + r"""Reservation consumption information that the instance is + consuming from. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + consumed_reservation (str): + [Output Only] The full resource name of the reservation that + this instance is consuming from. + + This field is a member of `oneof`_ ``_consumed_reservation``. + """ + + consumed_reservation: str = proto.Field( + proto.STRING, + number=318474741, + optional=True, + ) + + class ResourceStatusScheduling(proto.Message): r""" @@ -109273,7 +123711,7 @@ class ResourceStatusScheduling(proto.Message): This field is a member of `oneof`_ ``_availability_domain``. termination_timestamp (str): Time in future when the instance will be - terminated in RFC3339 text format. + terminated inRFC3339 text format. This field is a member of `oneof`_ ``_termination_timestamp``. """ @@ -109291,23 +123729,31 @@ class ResourceStatusScheduling(proto.Message): class ResourceStatusShutdownDetails(proto.Message): - r""" + r"""Specifies if the instance is in ``PENDING_STOP`` state or there is a + programmed stop scheduled. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: max_duration (google.cloud.compute_v1beta.types.Duration): + The duration for graceful shutdown. Only applicable when + ``stop_state=PENDING_STOP``. This field is a member of `oneof`_ ``_max_duration``. request_timestamp (str): + Past timestamp indicating the beginning of current + ``stopState`` in RFC3339 text format. This field is a member of `oneof`_ ``_request_timestamp``. stop_state (str): + Current stopping state of the instance. Check the StopState enum for the list of possible values. This field is a member of `oneof`_ ``_stop_state``. target_state (str): + Target instance state. Check the TargetState enum for the list of possible values. @@ -109315,32 +123761,32 @@ class ResourceStatusShutdownDetails(proto.Message): """ class StopState(proto.Enum): - r""" + r"""Current stopping state of the instance. Values: UNDEFINED_STOP_STATE (0): A value indicating that the enum field is not set. PENDING_STOP (362509770): - No description available. + The instance is gracefully shutting down. STOPPING (350791796): - No description available. + The instance is stopping. """ UNDEFINED_STOP_STATE = 0 PENDING_STOP = 362509770 STOPPING = 350791796 class TargetState(proto.Enum): - r""" + r"""Target instance state. Values: UNDEFINED_TARGET_STATE (0): A value indicating that the enum field is not set. DELETED (120962041): - No description available. + The instance will be deleted. STOPPED (444276141): - No description available. + The instance will be stopped. """ UNDEFINED_TARGET_STATE = 0 DELETED = 120962041 @@ -109388,17 +123834,21 @@ class ResumeInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -109448,21 +123898,25 @@ class ResumeInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -109512,17 +123966,21 @@ class ResumeInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -109565,12 +124023,14 @@ class RolloutPolicy(proto.Message): This field is a member of `oneof`_ ``_default_rollout_time``. location_rollout_policies (MutableMapping[str, str]): Location based rollout policies to apply to - the resource. Currently only zone names are - supported and must be represented as valid URLs, - like: zones/us-central1-a. The value expects an - RFC3339 timestamp on or after which the update - is considered rolled out to the specified - location. + the resource. + Currently only zone names are supported and must + be represented as valid URLs, like: + zones/us-central1-a. + + The value expects an RFC3339 timestamp on or + after which the update is considered rolled out + to the specified location. """ default_rollout_time: str = proto.Field( @@ -109586,10 +124046,11 @@ class RolloutPolicy(proto.Message): class Route(proto.Message): - r"""Represents a Route resource. A route defines a path from VM - instances in the VPC network to a specific destination. This - destination can be inside or outside the VPC network. For more - information, read the Routes overview. + r"""Represents a Route resource. + + A route defines a path from VM instances in the VPC network to a + specific destination. This destination can be inside or outside + the VPC network. For more information, read theRoutes overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -109598,7 +124059,7 @@ class Route(proto.Message): as_paths (MutableSequence[google.cloud.compute_v1beta.types.RouteAsPath]): [Output Only] AS path. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -109628,7 +124089,7 @@ class Route(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -109646,8 +124107,8 @@ class Route(proto.Message): The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid - URL: projects/ - project/global/gateways/default-internet-gateway + URL: + projects/project/global/gateways/default-internet-gateway This field is a member of `oneof`_ ``_next_hop_gateway``. next_hop_hub (str): @@ -109656,29 +124117,38 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_next_hop_hub``. next_hop_ilb (str): - The URL to a forwarding rule of type - loadBalancingScheme=INTERNAL that should handle - matching packets or the IP address of the + The URL to a forwarding rule of + typeloadBalancingScheme=INTERNAL that should + handle matching packets or the IP address of the forwarding Rule. For example, the following are - all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /forwardingRules/forwardingRule - - regions/region/forwardingRules/forwardingRule If - an IP address is provided, must specify an IPv4 - address in dot-decimal notation or an IPv6 + all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule + - + regions/region/forwardingRules/forwardingRule + + If an IP address is provided, must specify an + IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. For example, the - following are all valid IP addresses: - - 10.128.0.56 - 2001:db8::2d9:51:0:0 - - 2001:db8:0:0:2d9:51:0:0 IPv6 addresses will be - displayed using RFC 5952 compressed format (e.g. - 2001:db8::2d9:51:0:0). Should never be an - IPv4-mapped IPv6 address. + following are all valid IP addresses: + + + - 10.128.0.56 + - 2001:db8::2d9:51:0:0 + - 2001:db8:0:0:2d9:51:0:0 + + IPv6 addresses will be displayed using RFC 5952 + compressed format (e.g. 2001:db8::2d9:51:0:0). + Should never be an IPv4-mapped IPv6 address. This field is a member of `oneof`_ ``_next_hop_ilb``. next_hop_instance (str): The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ This field is a member of `oneof`_ ``_next_hop_instance``. @@ -109753,18 +124223,23 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_priority``. route_status (str): - [Output only] The status of the route. Check the RouteStatus - enum for the list of possible values. + [Output only] The status of the route. This status only + applies to dynamic routes learned by Cloud Routers. This + status is not applicable to static routes. Check the + RouteStatus enum for the list of possible values. This field is a member of `oneof`_ ``_route_status``. route_type (str): [Output Only] The type of this route, which can be one of - the following values: - 'TRANSIT' for a transit route that - this router learned from another Cloud Router and will - readvertise to one of its BGP peers - 'SUBNET' for a route - from a subnet of the VPC - 'BGP' for a route learned from a - BGP peer of this router - 'STATIC' for a static route Check - the RouteType enum for the list of possible values. + the following values: + + - 'TRANSIT' for a transit route that this router learned + from another Cloud Router and will readvertise to one of + its BGP peers + - 'SUBNET' for a route from a subnet of the VPC + - 'BGP' for a route learned from a BGP peer of this router + - 'STATIC' for a static route Check the RouteType enum for + the list of possible values. This field is a member of `oneof`_ ``_route_type``. self_link (str): @@ -109803,7 +124278,9 @@ class NextHopOrigin(proto.Enum): INCOMPLETE = 11941214 class RouteStatus(proto.Enum): - r"""[Output only] The status of the route. + r"""[Output only] The status of the route. This status only applies to + dynamic routes learned by Cloud Routers. This status is not + applicable to static routes. Values: UNDEFINED_ROUTE_STATUS (0): @@ -109813,7 +124290,7 @@ class RouteStatus(proto.Enum): This route is processed and active. DROPPED (496235424): The route is dropped due to the VPC exceeding - the dynamic route limit. For dynamic route + the dynamic route limit. For dynamic route limit, please refer to the Learned route example INACTIVE (270421099): This route is processed but inactive due to @@ -109831,11 +124308,13 @@ class RouteStatus(proto.Enum): class RouteType(proto.Enum): r"""[Output Only] The type of this route, which can be one of the - following values: - 'TRANSIT' for a transit route that this router - learned from another Cloud Router and will readvertise to one of its - BGP peers - 'SUBNET' for a route from a subnet of the VPC - 'BGP' - for a route learned from a BGP peer of this router - 'STATIC' for a - static route + following values: + + - 'TRANSIT' for a transit route that this router learned from + another Cloud Router and will readvertise to one of its BGP peers + - 'SUBNET' for a route from a subnet of the VPC + - 'BGP' for a route learned from a BGP peer of this router + - 'STATIC' for a static route Values: UNDEFINED_ROUTE_TYPE (0): @@ -110003,28 +124482,35 @@ class RouteAsPath(proto.Message): [Output Only] The AS numbers of the AS Path. path_segment_type (str): [Output Only] The type of the AS Path, which can be one of - the following values: - 'AS_SET': unordered set of - autonomous systems that the route in has traversed - - 'AS_SEQUENCE': ordered set of autonomous systems that the - route has traversed - 'AS_CONFED_SEQUENCE': ordered set of - Member Autonomous Systems in the local confederation that - the route has traversed - 'AS_CONFED_SET': unordered set of - Member Autonomous Systems in the local confederation that - the route has traversed Check the PathSegmentType enum for - the list of possible values. + the following values: + + - 'AS_SET': unordered set of autonomous systems that the + route in has traversed + - 'AS_SEQUENCE': ordered set of autonomous systems that the + route has traversed + - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous + Systems in the local confederation that the route has + traversed + - 'AS_CONFED_SET': unordered set of Member Autonomous + Systems in the local confederation that the route has + traversed Check the PathSegmentType enum for the list of + possible values. This field is a member of `oneof`_ ``_path_segment_type``. """ class PathSegmentType(proto.Enum): r"""[Output Only] The type of the AS Path, which can be one of the - following values: - 'AS_SET': unordered set of autonomous systems - that the route in has traversed - 'AS_SEQUENCE': ordered set of - autonomous systems that the route has traversed - - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in - the local confederation that the route has traversed - - 'AS_CONFED_SET': unordered set of Member Autonomous Systems in the - local confederation that the route has traversed + following values: + + - 'AS_SET': unordered set of autonomous systems that the route in + has traversed + - 'AS_SEQUENCE': ordered set of autonomous systems that the route + has traversed + - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in + the local confederation that the route has traversed + - 'AS_CONFED_SET': unordered set of Member Autonomous Systems in the + local confederation that the route has traversed Values: UNDEFINED_PATH_SEGMENT_TYPE (0): @@ -110076,7 +124562,7 @@ class RouteList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -110139,11 +124625,15 @@ class RouteParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -110171,9 +124661,11 @@ class RoutePolicy(proto.Message): by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint - hash in order to update or change labels. To see - the latest fingerprint, make a getRoutePolicy() - request to retrieve a Route Policy. + hash in order to update or change labels. + + To see the latest fingerprint, make a + getRoutePolicy() request to retrieve a Route + Policy. This field is a member of `oneof`_ ``_fingerprint``. name (str): @@ -110279,8 +124771,10 @@ class RoutePolicyPolicyTerm(proto.Message): class Router(proto.Message): - r"""Represents a Cloud Router resource. For more information - about Cloud Router, read the Cloud Router overview. + r"""Represents a Cloud Router resource. + + For more information about Cloud Router, read theCloud Router + overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -110295,9 +124789,9 @@ class Router(proto.Message): the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP - address. Please refer to RFC4273. + address. Please refer toRFC4273. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -110318,14 +124812,18 @@ class Router(proto.Message): This field is a member of `oneof`_ ``_id``. interfaces (MutableSequence[google.cloud.compute_v1beta.types.RouterInterface]): - Router interfaces. To create a BGP peer that - uses a router interface, the interface must have - one of the following fields specified: - - linkedVpnTunnel - linkedInterconnectAttachment - - subnetwork You can create a router interface - without any of these fields specified. However, - you cannot create a BGP peer that uses that - interface. + Router interfaces. + To create a BGP peer that uses a router + interface, the interface must have one of the + following fields specified: + + - linkedVpnTunnel + - linkedInterconnectAttachment + - subnetwork + + You can create a router interface without any of + these fields specified. However, you cannot + create a BGP peer that uses that interface. kind (str): [Output Only] Type of resource. Always compute#router for routers. @@ -110336,7 +124834,7 @@ class Router(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -110508,7 +125006,7 @@ class RouterAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -110598,7 +125096,7 @@ class RouterBgp(proto.Message): no custom IP ranges. asn (int): Local BGP Autonomous System Number (ASN). - Must be an RFC6996 private ASN, either 16-bit or + Must be anRFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. @@ -110610,23 +125108,28 @@ class RouterBgp(proto.Message): link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP - session ranges. Other vendors commonly call this - "router ID". + session ranges. + + Other vendors commonly call this "router ID". This field is a member of `oneof`_ ``_identifier_range``. keepalive_interval (int): The interval in seconds between BGP keepalive - messages that are sent to the peer. Hold time is - three times the interval at which keepalive - messages are sent, and the hold time is the - maximum number of seconds allowed to elapse - between successive keepalive messages that BGP - receives from a peer. BGP will use the smaller - of either the local hold time value or the - peer's hold time value as the hold time for the - BGP connection between the two peers. If set, - this value must be between 20 and 60. The - default is 20. + messages that are sent to the peer. + + Hold time is three times the interval at which + keepalive messages are sent, and the hold time + is the maximum number of seconds allowed to + elapse between successive keepalive messages + that BGP receives from a peer. + + BGP will use the smaller of either the local + hold time value or the peer's hold time value as + the hold time for the BGP connection between the + two peers. + + If set, this value must be between 20 and 60. + The default is 20. This field is a member of `oneof`_ ``_keepalive_interval``. """ @@ -110709,15 +125212,20 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_advertise_mode``. advertised_groups (MutableSequence[str]): User-specified list of prefix groups to advertise in custom - mode, which currently supports the following option: - - ALL_SUBNETS: Advertises all of the router's own VPC subnets. - This excludes any routes learned for subnets that use VPC - Network Peering. Note that this field can only be populated - if advertise_mode is CUSTOM and overrides the list defined - for the router (in the "bgp" message). These groups are - advertised in addition to any specified prefixes. Leave this - field blank to advertise no custom groups. Check the - AdvertisedGroups enum for the list of possible values. + mode, which currently supports the following option: + + :: + + - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This + excludes any routes learned for subnets that use + VPC Network Peering. + + Note that this field can only be populated if advertise_mode + is CUSTOM and overrides the list defined for the router (in + the "bgp" message). These groups are advertised in addition + to any specified prefixes. Leave this field blank to + advertise no custom groups. Check the AdvertisedGroups enum + for the list of possible values. advertised_ip_ranges (MutableSequence[google.cloud.compute_v1beta.types.RouterAdvertisedIpRange]): User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if @@ -110748,13 +125256,15 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_custom_learned_route_priority``. enable (str): - The status of the BGP peer connection. If set - to FALSE, any active session with the peer is - terminated and all associated routing + The status of the BGP peer connection. + + If set to FALSE, any active session with the + peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing - information. The default is TRUE. Check the - Enable enum for the list of possible values. + information. The default is TRUE. + Check the Enable enum for the list of possible + values. This field is a member of `oneof`_ ``_enable``. enable_ipv4 (bool): @@ -110799,13 +125309,18 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_ipv6_nexthop_address``. management_type (str): [Output Only] The resource that configures and manages this - BGP peer. - MANAGED_BY_USER is the default value and can be - managed by you or other users - MANAGED_BY_ATTACHMENT is a - BGP peer that is configured and managed by Cloud - Interconnect, specifically by an InterconnectAttachment of - type PARTNER. Google automatically creates, updates, and - deletes this type of BGP peer when the PARTNER - InterconnectAttachment is created, updated, or deleted. + BGP peer. + + :: + + - MANAGED_BY_USER is the default value and can be managed by you + or other users + - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + by Cloud Interconnect, specifically by an InterconnectAttachment of type + PARTNER. Google automatically creates, updates, and deletes this type of + BGP peer when the PARTNER InterconnectAttachment is created, updated, + or deleted. + Check the ManagementType enum for the list of possible values. @@ -110819,8 +125334,8 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_md5_authentication_key_name``. name (str): Name of this BGP peer. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, @@ -110853,8 +125368,9 @@ class RouterBgpPeer(proto.Message): Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud - Router. The VM instance is the peer side of the - BGP session. + Router. + The VM instance is the peer side of the BGP + session. This field is a member of `oneof`_ ``_router_appliance_instance``. """ @@ -110891,11 +125407,12 @@ class AdvertisedGroups(proto.Enum): ALL_SUBNETS = 3622872 class Enable(proto.Enum): - r"""The status of the BGP peer connection. If set to FALSE, any - active session with the peer is terminated and all associated - routing information is removed. If set to TRUE, the peer - connection can be established with routing information. The - default is TRUE. + r"""The status of the BGP peer connection. + + If set to FALSE, any active session with the peer is terminated + and all associated routing information is removed. If set to + TRUE, the peer connection can be established with routing + information. The default is TRUE. Values: UNDEFINED_ENABLE (0): @@ -110912,12 +125429,17 @@ class Enable(proto.Enum): class ManagementType(proto.Enum): r"""[Output Only] The resource that configures and manages this BGP - peer. - MANAGED_BY_USER is the default value and can be managed by - you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is - configured and managed by Cloud Interconnect, specifically by an - InterconnectAttachment of type PARTNER. Google automatically - creates, updates, and deletes this type of BGP peer when the PARTNER - InterconnectAttachment is created, updated, or deleted. + peer. + + :: + + - MANAGED_BY_USER is the default value and can be managed by you + or other users + - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + by Cloud Interconnect, specifically by an InterconnectAttachment of type + PARTNER. Google automatically creates, updates, and deletes this type of + BGP peer when the PARTNER InterconnectAttachment is created, updated, + or deleted. Values: UNDEFINED_MANAGEMENT_TYPE (0): @@ -111078,8 +125600,12 @@ class RouterBgpPeerBfd(proto.Message): peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval - of the other router. If set, this value must be - between 1000 and 30000. The default is 1000. + of the other router. + + If set, this value must be between 1000 and + 30000. + + The default is 1000. This field is a member of `oneof`_ ``_min_receive_interval``. min_transmit_interval (int): @@ -111088,38 +125614,48 @@ class RouterBgpPeerBfd(proto.Message): peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding - receive interval of the other router. If set, - this value must be between 1000 and 30000. The - default is 1000. + receive interval of the other router. + + If set, this value must be between 1000 and + 30000. + + The default is 1000. This field is a member of `oneof`_ ``_min_transmit_interval``. multiplier (int): The number of consecutive BFD packets that must be missed before BFD declares that a peer - is unavailable. If set, the value must be a - value between 5 and 16. The default is 5. + is unavailable. + + If set, the value must be a value between 5 and + 16. + + The default is 5. This field is a member of `oneof`_ ``_multiplier``. session_initialization_mode (str): The BFD session initialization mode for this - BGP peer. If set to ACTIVE, the Cloud Router - will initiate the BFD session for this BGP peer. - If set to PASSIVE, the Cloud Router will wait - for the peer router to initiate the BFD session - for this BGP peer. If set to DISABLED, BFD is - disabled for this BGP peer. The default is - DISABLED. Check the SessionInitializationMode - enum for the list of possible values. + BGP peer. + + If set to ACTIVE, the Cloud Router will initiate + the BFD session for this BGP peer. If set to + PASSIVE, the Cloud Router will wait for the peer + router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for + this BGP peer. The default is DISABLED. Check + the SessionInitializationMode enum for the list + of possible values. This field is a member of `oneof`_ ``_session_initialization_mode``. """ class SessionInitializationMode(proto.Enum): - r"""The BFD session initialization mode for this BGP peer. If set - to ACTIVE, the Cloud Router will initiate the BFD session for - this BGP peer. If set to PASSIVE, the Cloud Router will wait for - the peer router to initiate the BFD session for this BGP peer. - If set to DISABLED, BFD is disabled for this BGP peer. The + r"""The BFD session initialization mode for this BGP peer. + + If set to ACTIVE, the Cloud Router will initiate the BFD session + for this BGP peer. If set to PASSIVE, the Cloud Router will wait + for the peer router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is DISABLED. Values: @@ -111189,21 +125725,24 @@ class RouterInterface(proto.Message): Attributes: ip_range (str): - IP address and range of the interface. - For - Internet Protocol version 4 (IPv4), the IP range - must be in the RFC3927 link-local IP address - space. The value must be a CIDR-formatted - string, for example, 169.254.0.1/30. Note: Do - not truncate the IP address, as it represents - the IP address of the interface. - For Internet - Protocol version 6 (IPv6), the value must be a - unique local address (ULA) range from - fdff:1::/64 with a mask length of 126 or less. - This value should be a CIDR-formatted string, - for example, fdff:1::1/112. Within the router's - VPC, this IPv6 prefix will be reserved - exclusively for this connection and cannot be - used for any other purpose. + IP address and range of the interface. + + - For Internet Protocol version 4 (IPv4), the IP + range must be in theRFC3927 link-local IP + address space. The value must be a + CIDR-formatted string, for example, + 169.254.0.1/30. Note: Do not truncate the + IP address, as it represents the IP address of + the interface. + - For Internet Protocol version 6 (IPv6), the + value must be a unique local address (ULA) + range from fdff:1::/64 with a mask length + of 126 or less. This value should be a + CIDR-formatted string, for example, + fdff:1::1/112. Within the router's VPC, + this IPv6 prefix will be reserved exclusively + for this connection and cannot be used for + any other purpose. This field is a member of `oneof`_ ``_ip_range``. ip_version (str): @@ -111230,20 +125769,25 @@ class RouterInterface(proto.Message): This field is a member of `oneof`_ ``_linked_vpn_tunnel``. management_type (str): [Output Only] The resource that configures and manages this - interface. - MANAGED_BY_USER is the default value and can be - managed directly by users. - MANAGED_BY_ATTACHMENT is an - interface that is configured and managed by Cloud - Interconnect, specifically, by an InterconnectAttachment of - type PARTNER. Google automatically creates, updates, and - deletes this type of interface when the PARTNER - InterconnectAttachment is created, updated, or deleted. + interface. + + :: + + - MANAGED_BY_USER is the default value and can be managed directly + by users. + - MANAGED_BY_ATTACHMENT is an interface that is configured and + managed by Cloud Interconnect, specifically, by an InterconnectAttachment + of type PARTNER. Google automatically creates, updates, and deletes + this type of interface when the PARTNER InterconnectAttachment is + created, updated, or deleted. + Check the ManagementType enum for the list of possible values. This field is a member of `oneof`_ ``_management_type``. name (str): Name of this interface entry. The name must be 1-63 - characters long, and comply with RFC1035. Specifically, the + characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -111267,7 +125811,7 @@ class RouterInterface(proto.Message): must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters - long, and comply with RFC1035. Specifically, the + long, and comply withRFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and @@ -111305,12 +125849,17 @@ class IpVersion(proto.Enum): class ManagementType(proto.Enum): r"""[Output Only] The resource that configures and manages this - interface. - MANAGED_BY_USER is the default value and can be managed - directly by users. - MANAGED_BY_ATTACHMENT is an interface that is - configured and managed by Cloud Interconnect, specifically, by an - InterconnectAttachment of type PARTNER. Google automatically - creates, updates, and deletes this type of interface when the - PARTNER InterconnectAttachment is created, updated, or deleted. + interface. + + :: + + - MANAGED_BY_USER is the default value and can be managed directly + by users. + - MANAGED_BY_ATTACHMENT is an interface that is configured and + managed by Cloud Interconnect, specifically, by an InterconnectAttachment + of type PARTNER. Google automatically creates, updates, and deletes + this type of interface when the PARTNER InterconnectAttachment is + created, updated, or deleted. Values: UNDEFINED_MANAGEMENT_TYPE (0): @@ -111322,8 +125871,9 @@ class ManagementType(proto.Enum): automatically create/update/delete this interface when the PARTNER InterconnectAttachment is - created/provisioned/deleted. This type of - interface cannot be manually managed by user. + created/provisioned/deleted. + This type of interface cannot be manually + managed by user. MANAGED_BY_USER (317294067): Default value, the interface is manually created and managed by user. @@ -111400,7 +125950,7 @@ class RouterList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -111460,17 +126010,21 @@ class RouterMd5AuthenticationKey(proto.Message): Attributes: key (str): - [Input only] Value of the key. For patch and update calls, - it can be skipped to copy the value from the previous - configuration. This is allowed if the key with the same name - existed before the operation. Maximum length is 80 - characters. Can only contain printable ASCII characters. + [Input only] Value of the key. + + For patch and update calls, it can be skipped to copy the + value from the previous configuration. This is allowed if + the key with the same name existed before the operation. + Maximum length is 80 characters. Can only contain printable + ASCII characters. This field is a member of `oneof`_ ``_key``. name (str): - Name used to identify the key. Must be unique - within a router. Must be referenced by exactly - one bgpPeer. Must comply with RFC1035. + Name used to identify the key. + + Must be unique within a router. Must be + referenced by exactly one bgpPeer. Must comply + withRFC1035. This field is a member of `oneof`_ ``_name``. """ @@ -111503,7 +126057,8 @@ class RouterNat(proto.Message): The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the - current project-level default tier is used. + current + project-level default tier is used. Check the AutoNetworkTier enum for the list of possible values. @@ -111515,16 +126070,21 @@ class RouterNat(proto.Message): IPs should be used for updating/patching a NAT only. enable_dynamic_port_allocation (bool): - Enable Dynamic Port Allocation. If not - specified, it is disabled by default. If set to - true, - Dynamic Port Allocation will be enabled - on this NAT config. - - enableEndpointIndependentMapping cannot be set - to true. - If minPorts is set, minPortsPerVm - must be set to a power of two greater than or - equal to 32. If minPortsPerVm is not set, a - minimum of 32 ports will be allocated to a VM - from this NAT config. + Enable Dynamic Port Allocation. + + If not specified, it is disabled by default. + + If set to true, + + - Dynamic Port Allocation will be enabled on + this NAT config. + - enableEndpointIndependentMapping cannot be + set to true. + - If minPorts is set, minPortsPerVm must be + set to a power of two greater than or equal + to 32. If minPortsPerVm is not set, a + minimum of 32 ports will be allocated to a VM + from this NAT config. This field is a member of `oneof`_ ``_enable_dynamic_port_allocation``. enable_endpoint_independent_mapping (bool): @@ -111547,15 +126107,19 @@ class RouterNat(proto.Message): max_ports_per_vm (int): Maximum number of ports allocated to a VM from this NAT config when Dynamic Port - Allocation is enabled. If Dynamic Port - Allocation is not enabled, this field has no - effect. If Dynamic Port Allocation is enabled, - and this field is set, it must be set to a power - of two greater than minPortsPerVm, or 64 if - minPortsPerVm is not set. If Dynamic Port - Allocation is enabled and this field is not set, - a maximum of 65536 ports will be allocated to a - VM from this NAT config. + Allocation is enabled. + + If Dynamic Port Allocation is not enabled, this + field has no effect. + + If Dynamic Port Allocation is enabled, and this + field is set, it must be set to a power of two + greater than minPortsPerVm, or 64 if + minPortsPerVm is not set. + + If Dynamic Port Allocation is enabled and this + field is not set, a maximum of 65536 ports will + be allocated to a VM from this NAT config. This field is a member of `oneof`_ ``_max_ports_per_vm``. min_ports_per_vm (int): @@ -111568,9 +126132,9 @@ class RouterNat(proto.Message): This field is a member of `oneof`_ ``_min_ports_per_vm``. name (str): - Unique name of this Nat service. The name - must be 1-63 characters long and comply with - RFC1035. + Unique name of this Nat service. + The name must be 1-63 characters long and comply + withRFC1035. This field is a member of `oneof`_ ``_name``. nat64_subnetworks (MutableSequence[google.cloud.compute_v1beta.types.RouterNatSubnetworkToNat64]): @@ -111580,13 +126144,19 @@ class RouterNat(proto.Message): SubnetworkIpRangeToNat64Option above. nat_ip_allocate_option (str): Specify the NatIpAllocateOption, which can take one of the - following values: - MANUAL_ONLY: Uses only Nat IP addresses - provided by customers. When there are not enough specified - Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat - IPs are allocated by Google Cloud Platform; customers can't - specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip - should be empty. Check the NatIpAllocateOption enum for the - list of possible values. + following values: + + :: + + - MANUAL_ONLY: Uses only Nat IP addresses provided by + customers. When there are not enough specified Nat IPs, the Nat service + fails for new VMs. + - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers + can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should + be empty. + + Check the NatIpAllocateOption enum for the list of possible + values. This field is a member of `oneof`_ ``_nat_ip_allocate_option``. nat_ips (MutableSequence[str]): @@ -111598,12 +126168,18 @@ class RouterNat(proto.Message): A list of rules associated with this NAT. source_subnetwork_ip_ranges_to_nat (str): Specify the Nat option, which can take one of the following - values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP - ranges in every Subnetwork are allowed to Nat. - - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP - ranges in every Subnetwork are allowed to Nat. - - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to - Nat (specified in the field subnetwork below) The default is + values: + + :: + + - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every + Subnetwork are allowed to Nat. + - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges + in every Subnetwork are allowed to Nat. + - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field subnetwork below) + + The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for @@ -111614,12 +126190,17 @@ class RouterNat(proto.Message): This field is a member of `oneof`_ ``_source_subnetwork_ip_ranges_to_nat``. source_subnetwork_ip_ranges_to_nat64 (str): Specify the Nat option for NAT64, which can take one of the - following values: - ALL_IPV6_SUBNETWORKS: All of the IP - ranges in every Subnetwork are allowed to Nat. - - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed - to Nat (specified in the field nat64_subnetwork below) The - default is NAT64_OPTION_UNSPECIFIED. Note that if this field - contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat + following values: + + :: + + - ALL_IPV6_SUBNETWORKS: All of the IP ranges in + every Subnetwork are allowed to Nat. + - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field nat64_subnetwork below) + + The default is NAT64_OPTION_UNSPECIFIED. Note that if this + field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in this region can also enable NAT64 for any Subnetworks in this network. Other Router.Nat sections can still be present to enable NAT44 only. Check the @@ -111663,8 +126244,9 @@ class RouterNat(proto.Message): class AutoNetworkTier(proto.Enum): r"""The network tier to use when automatically reserving NAT IP - addresses. Must be one of: PREMIUM, STANDARD. If not specified, - then the current project-level default tier is used. + addresses. Must be one of: PREMIUM, STANDARD. + If not specified, then the current + project-level default tier is used. Values: UNDEFINED_AUTO_NETWORK_TIER (0): @@ -111713,11 +126295,16 @@ class EndpointTypes(proto.Enum): class NatIpAllocateOption(proto.Enum): r"""Specify the NatIpAllocateOption, which can take one of the following - values: - MANUAL_ONLY: Uses only Nat IP addresses provided by - customers. When there are not enough specified Nat IPs, the Nat - service fails for new VMs. - AUTO_ONLY: Nat IPs are allocated by - Google Cloud Platform; customers can't specify any Nat IPs. When - choosing AUTO_ONLY, then nat_ip should be empty. + values: + + :: + + - MANUAL_ONLY: Uses only Nat IP addresses provided by + customers. When there are not enough specified Nat IPs, the Nat service + fails for new VMs. + - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers + can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should + be empty. Values: UNDEFINED_NAT_IP_ALLOCATE_OPTION (0): @@ -111737,16 +126324,20 @@ class NatIpAllocateOption(proto.Enum): class SourceSubnetworkIpRangesToNat(proto.Enum): r"""Specify the Nat option, which can take one of the following values: - - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every - Subnetwork are allowed to Nat. - - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges - in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A - list of Subnetworks are allowed to Nat (specified in the field - subnetwork below) The default is - SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this - field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not - be any other Router.Nat section in any Router for this network in - this region. + + :: + + - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every + Subnetwork are allowed to Nat. + - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges + in every Subnetwork are allowed to Nat. + - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field subnetwork below) + + The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note + that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there + should not be any other Router.Nat section in any Router for this + network in this region. Values: UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT (0): @@ -111769,14 +126360,20 @@ class SourceSubnetworkIpRangesToNat(proto.Enum): class SourceSubnetworkIpRangesToNat64(proto.Enum): r"""Specify the Nat option for NAT64, which can take one of the - following values: - ALL_IPV6_SUBNETWORKS: All of the IP ranges in - every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A - list of Subnetworks are allowed to Nat (specified in the field - nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. - Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no other - Router.Nat section in this region can also enable NAT64 for any - Subnetworks in this network. Other Router.Nat sections can still be - present to enable NAT44 only. + following values: + + :: + + - ALL_IPV6_SUBNETWORKS: All of the IP ranges in + every Subnetwork are allowed to Nat. + - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field nat64_subnetwork below) + + The default is NAT64_OPTION_UNSPECIFIED. Note that if this field + contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in + this region can also enable NAT64 for any Subnetworks in this + network. Other Router.Nat sections can still be present to enable + NAT44 only. Values: UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT64 (0): @@ -111807,8 +126404,8 @@ class Type(proto.Enum): PRIVATE (403485027): NAT used for private IP translation. PUBLIC (223389289): - NAT used for public IP translation. This is - the default. + NAT used for public IP translation. + This is the default. """ UNDEFINED_TYPE = 0 PRIVATE = 403485027 @@ -111941,11 +126538,17 @@ class RouterNatLogConfig(proto.Message): Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following - values: - ERRORS_ONLY: Export logs only for connection - failures. - TRANSLATIONS_ONLY: Export logs only for - successful connections. - ALL: Export logs for all - connections, successful and unsuccessful. Check the Filter - enum for the list of possible values. + values: + + :: + + - ERRORS_ONLY: Export logs only for connection failures. + - TRANSLATIONS_ONLY: Export logs only for successful + connections. + - ALL: Export logs for all connections, successful and + unsuccessful. + + Check the Filter enum for the list of possible values. This field is a member of `oneof`_ ``_filter``. """ @@ -111953,10 +126556,15 @@ class RouterNatLogConfig(proto.Message): class Filter(proto.Enum): r"""Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This - option can take one of the following values: - ERRORS_ONLY: Export - logs only for connection failures. - TRANSLATIONS_ONLY: Export logs - only for successful connections. - ALL: Export logs for all - connections, successful and unsuccessful. + option can take one of the following values: + + :: + + - ERRORS_ONLY: Export logs only for connection failures. + - TRANSLATIONS_ONLY: Export logs only for successful + connections. + - ALL: Export logs for all connections, successful and + unsuccessful. Values: UNDEFINED_FILTER (0): @@ -112006,12 +126614,17 @@ class RouterNatRule(proto.Message): CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ``action`` is enforced. + The following examples are valid match expressions for public NAT: + ``inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')`` + ``destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'`` + The following example is a valid match expression for private NAT: + ``nexthop.hub == '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`` This field is a member of `oneof`_ ``_match``. @@ -112055,7 +126668,8 @@ class RouterNatRuleAction(proto.Message): A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the - project. This field is used for public NAT. + project. + This field is used for public NAT. source_nat_active_ranges (MutableSequence[str]): A list of URLs of the subnetworks used as source ranges for this NAT Rule. These subnetworks must have purpose set to @@ -112071,8 +126685,8 @@ class RouterNatRuleAction(proto.Message): source ranges to be drained. This is only supported on patch/update, and these subnetworks must have previously been used as active ranges - in this NAT Rule. This field is used for private - NAT. + in this NAT Rule. + This field is used for private NAT. """ source_nat_active_ips: MutableSequence[str] = proto.RepeatedField( @@ -112184,14 +126798,18 @@ class RouterParams(proto.Message): is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid - inputs: \* {"tagKeys/333" : "tagValues/444", "tagKeys/123" : - "tagValues/456"} \* {"123/environment" : "production", - "345/abc" : "xyz"} Note: \* Invalid combinations of ID & - namespaced format is not supported. For instance: - {"123/environment" : "tagValues/444"} is invalid. \* - Inconsistent format is not supported. For instance: - {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is - invalid. + inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -112211,19 +126829,22 @@ class RouterStatus(proto.Message): A list of the best dynamic routes for this Cloud Router's Virtual Private Cloud (VPC) network in the same region as this Cloud Router. + Lists all of the best routes per prefix that are programmed into this region's VPC data plane. + When global dynamic routing mode is turned on in the VPC network, this list can include cross-region dynamic routes from Cloud Routers in other regions. best_routes_for_router (MutableSequence[google.cloud.compute_v1beta.types.Route]): A list of the best BGP routes learned by this - Cloud Router. It is possible that routes listed - might not be programmed into the data plane, if - the Google Cloud control plane finds a more - optimal route for a prefix than a route learned - by this Cloud Router. + Cloud Router. + It is possible that routes listed might not be + programmed into the data plane, if the Google + Cloud control plane finds a more optimal route + for a prefix than a route learned by this Cloud + Router. bgp_peer_status (MutableSequence[google.cloud.compute_v1beta.types.RouterStatusBgpPeerStatus]): nat_status (MutableSequence[google.cloud.compute_v1beta.types.RouterStatusNatStatus]): @@ -112284,14 +126905,14 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_bfd_status``. enable_ipv4 (bool): - Enable IPv4 traffic over BGP Peer. It is - enabled by default if the peerIpAddress is + Enable IPv4 traffic over BGP Peer. + It is enabled by default if the peerIpAddress is version 4. This field is a member of `oneof`_ ``_enable_ipv4``. enable_ipv6 (bool): - Enable IPv6 traffic over BGP Peer. It is - enabled by default if the peerIpAddress is + Enable IPv6 traffic over BGP Peer. + It is enabled by default if the peerIpAddress is version 6. This field is a member of `oneof`_ ``_enable_ipv6``. @@ -112348,7 +126969,7 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_router_appliance_instance``. state (str): The state of the BGP session. For a list of - possible values for this field, see BGP session + possible values for this field, seeBGP session states. This field is a member of `oneof`_ ``_state``. @@ -112365,14 +126986,18 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_status_reason``. uptime (str): - Time this session has been up. Format: 14 - years, 51 weeks, 6 days, 23 hours, 59 minutes, - 59 seconds + Time this session has been up. + Format: + + 14 years, 51 weeks, 6 days, 23 hours, 59 + minutes, 59 seconds This field is a member of `oneof`_ ``_uptime``. uptime_seconds (str): Time this session has been up, in seconds. - Format: 145 + Format: + + 145 This field is a member of `oneof`_ ``_uptime_seconds``. """ @@ -112563,8 +127188,9 @@ class RouterStatusNatStatus(proto.Message): A list of fully qualified URLs of reserved IP address resources. user_allocated_nat_ips (MutableSequence[str]): - A list of IPs user-allocated for NAT. They - will be raw IP strings like "179.12.26.133". + A list of IPs user-allocated for NAT. + They will be raw IP strings like + "179.12.26.133". """ auto_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( @@ -112728,14 +127354,14 @@ class RoutersListBgpRoutes(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#routersListBgpRoutes for lists of bgp routes. + [Output Only] Type of resource. + Alwayscompute#routersListBgpRoutes for lists of bgp routes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -112816,15 +127442,15 @@ class RoutersListRoutePolicies(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#routersListRoutePolicies for lists of route + [Output Only] Type of resource. + Alwayscompute#routersListRoutePolicies for lists of route policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -112947,7 +127573,7 @@ class SSLHealthCheck(proto.Message): port (int): The TCP port number to which the health check prober sends packets. The default value is 443. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -112957,7 +127583,7 @@ class SSLHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -112970,14 +127596,16 @@ class SSLHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -113002,6 +127630,7 @@ class SSLHealthCheck(proto.Message): check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp This field is a member of `oneof`_ ``_response``. @@ -113010,7 +127639,7 @@ class SSLHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -113022,13 +127651,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -113104,8 +127734,8 @@ class ProxyHeader(proto.Enum): class SavedAttachedDisk(proto.Message): - r"""DEPRECATED: Please use compute#savedDisk instead. An - instance-attached disk resource. + r"""DEPRECATED: Please use compute#savedDisk instead. + An instance-attached disk resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -113138,8 +127768,9 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_disk_size_gb``. disk_type (str): - [Output Only] URL of the disk type resource. For example: - projects/project /zones/zone/diskTypes/pd-standard or pd-ssd + [Output Only] URL of the disk type resource. For + example:projects/project/zones/zone/diskTypes/pd-standard or + pd-ssd This field is a member of `oneof`_ ``_disk_type``. guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): @@ -113160,16 +127791,16 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_interface``. kind (str): - [Output Only] Type of the resource. Always - compute#attachedDisk for attached disks. + [Output Only] Type of the resource. + Alwayscompute#attachedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. licenses (MutableSequence[str]): [Output Only] Any valid publicly visible licenses. mode (str): The mode in which this disk is attached to the source - instance, either READ_WRITE or READ_ONLY. Check the Mode - enum for the list of possible values. + instance, eitherREAD_WRITE or READ_ONLY. Check the Mode enum + for the list of possible values. This field is a member of `oneof`_ ``_mode``. source (str): @@ -113194,8 +127825,8 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_storage_bytes_status``. type_ (str): Specifies the type of the attached disk, - either SCRATCH or PERSISTENT. Check the Type - enum for the list of possible values. + either SCRATCH orPERSISTENT. Check the Type enum + for the list of possible values. This field is a member of `oneof`_ ``_type``. """ @@ -113219,7 +127850,7 @@ class Interface(proto.Enum): class Mode(proto.Enum): r"""The mode in which this disk is attached to the source instance, - either READ_WRITE or READ_ONLY. + eitherREAD_WRITE or READ_ONLY. Values: UNDEFINED_MODE (0): @@ -113259,8 +127890,8 @@ class StorageBytesStatus(proto.Enum): UP_TO_DATE = 101306702 class Type(proto.Enum): - r"""Specifies the type of the attached disk, either SCRATCH or - PERSISTENT. + r"""Specifies the type of the attached disk, either SCRATCH + orPERSISTENT. Values: UNDEFINED_TYPE (0): @@ -113543,10 +128174,12 @@ class Scheduling(proto.Message): automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for - standard instances. Preemptible instances cannot - be automatically restarted. By default, this is - set to true so an instance is automatically - restarted if it is terminated by Compute Engine. + standard instances.Preemptible instances cannot + be automatically restarted. + + By default, this is set to true so an instance + is automatically restarted if it is terminated + by Compute Engine. This field is a member of `oneof`_ ``_automatic_restart``. availability_domain (int): @@ -113583,9 +128216,9 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_local_ssd_recovery_timeout``. location_hint (str): An opaque location hint used to place the - instance close to other resources. This field is - for use by internal tools that use the public - API. + instance close to other resources. + This field is for use by internal tools that use + the public API. This field is a member of `oneof`_ ``_location_hint``. maintenance_freeze_duration_hours (int): @@ -113615,17 +128248,19 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_min_node_cpus``. node_affinities (MutableSequence[google.cloud.compute_v1beta.types.SchedulingNodeAffinity]): A set of node affinity and anti-affinity - configurations. Refer to Configuring node + configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity. on_host_maintenance (str): Defines the maintenance behavior for this instance. For standard instances, the default - behavior is MIGRATE. For preemptible instances, + behavior is MIGRATE. Forpreemptible instances, the default and only possible behavior is - TERMINATE. For more information, see Set VM host - maintenance policy. Check the OnHostMaintenance - enum for the list of possible values. + TERMINATE. For more information, see + Set + VM host maintenance policy. + Check the OnHostMaintenance enum for the list of + possible values. This field is a member of `oneof`_ ``_on_host_maintenance``. on_instance_stop_action (google.cloud.compute_v1beta.types.SchedulingOnInstanceStopAction): @@ -113633,9 +128268,9 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_on_instance_stop_action``. preemptible (bool): Defines whether the instance is preemptible. This can only - be set during instance creation or while the instance is - stopped and therefore, in a ``TERMINATED`` state. See - Instance Life Cycle for more information on the possible + be set during instance creation or while the instance + isstopped and therefore, in a ``TERMINATED`` state. + SeeInstance Life Cycle for more information on the possible instance states. This field is a member of `oneof`_ ``_preemptible``. @@ -113654,7 +128289,7 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_skip_guest_os_shutdown``. termination_time (str): Specifies the timestamp, when the instance - will be terminated, in RFC3339 text format. If + will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time. @@ -113694,13 +128329,13 @@ class MaintenanceInterval(proto.Enum): and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. + than the PERIODIC andRECURRENT options. PERIODIC (142804635): VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT (194244550): @@ -113708,7 +128343,7 @@ class MaintenanceInterval(proto.Enum): periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. @@ -113720,10 +128355,11 @@ class MaintenanceInterval(proto.Enum): class OnHostMaintenance(proto.Enum): r"""Defines the maintenance behavior for this instance. For - standard instances, the default behavior is MIGRATE. For - preemptible instances, the default and only possible behavior is - TERMINATE. For more information, see Set VM host maintenance - policy. + standard instances, the default behavior is MIGRATE. + Forpreemptible instances, the default and only possible behavior + is TERMINATE. For more information, see + Set + VM host maintenance policy. Values: UNDEFINED_ON_HOST_MAINTENANCE (0): @@ -113901,7 +128537,7 @@ class SchedulingGracefulShutdown(proto.Message): class SchedulingNodeAffinity(proto.Message): r"""Node Affinity: the configuration of desired nodes onto which - this Instance could be scheduled. + this Instance could be scheduled. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -113913,8 +128549,8 @@ class SchedulingNodeAffinity(proto.Message): This field is a member of `oneof`_ ``_key``. operator (str): - Defines the operation of node selection. Valid operators are - IN for affinity and NOT_IN for anti-affinity. Check the + Defines the operation of node selection. Valid operators + areIN for affinity and NOT_IN for anti-affinity. Check the Operator enum for the list of possible values. This field is a member of `oneof`_ ``_operator``. @@ -113924,7 +128560,7 @@ class SchedulingNodeAffinity(proto.Message): """ class Operator(proto.Enum): - r"""Defines the operation of node selection. Valid operators are IN for + r"""Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity. Values: @@ -113963,7 +128599,7 @@ class Operator(proto.Enum): class SchedulingOnInstanceStopAction(proto.Message): r"""Defines the behaviour for instances with the - instance_termination_action STOP. + instance_termination_actionSTOP. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -114033,15 +128669,15 @@ class SecurityPoliciesAggregatedList(proto.Message): A list of SecurityPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#securityPolicyAggregatedList for lists of Security - Policies. + [Output Only] Type of resource. + Alwayscompute#securityPolicyAggregatedList for lists of + Security Policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -114175,6 +128811,7 @@ class SecurityPoliciesWafConfig(proto.Message): class SecurityPolicy(proto.Message): r"""Represents a Google Cloud Armor security policy resource. + Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview. @@ -114193,7 +128830,7 @@ class SecurityPolicy(proto.Message): A list of associations that belong to this policy. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. ddos_protection_config (google.cloud.compute_v1beta.types.SecurityPolicyDdosProtectionConfig): @@ -114228,9 +128865,10 @@ class SecurityPolicy(proto.Message): or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make get() request to the - security policy. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make get() + request to the security policy. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -114239,8 +128877,8 @@ class SecurityPolicy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#securityPolicyfor security policies + [Output only] Type of the resource. + Alwayscompute#securityPolicyfor security policies This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -114251,20 +128889,21 @@ class SecurityPolicy(proto.Message): by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in - order to update or change labels. To see the - latest fingerprint, make get() request to the - security policy. + order to update or change labels. + + To see the latest fingerprint, make get() + request to the security policy. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -114325,26 +128964,30 @@ class SecurityPolicy(proto.Message): This field is a member of `oneof`_ ``_short_name``. type_ (str): The type indicates the intended use of the security policy. - - CLOUD_ARMOR: Cloud Armor backend security policies can be - configured to filter incoming HTTP requests targeting - backend services. They filter requests before they hit the - origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge - security policies can be configured to filter incoming HTTP - requests targeting backend services (including Cloud - CDN-enabled) as well as backend buckets (Cloud Storage). - They filter requests before the request is served from - Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE (preview - only): Cloud Armor internal service policies can be - configured to filter HTTP requests targeting services - managed by Traffic Director in a service mesh. They filter - requests before the request is served from the application. + + :: + + - CLOUD_ARMOR: Cloud Armor backend security policies can + be configured to filter incoming HTTP requests targeting backend services. + They filter requests before they hit the origin servers. + - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can + be configured to filter incoming HTTP requests targeting backend services + (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). + They filter requests before the request is served from Google's cache. + - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor + internal service policies can be configured to filter HTTP requests + targeting services managed by Traffic Director in a service mesh. They + filter requests before the request is served from the application. + - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be - configured to filter packets targeting network load - balancing resources such as backend services, target pools, - target instances, and instances with external IPs. They - filter requests before the request is served from the - application. This field can be set only at resource creation - time. Check the Type enum for the list of possible values. + configured to filter packets targeting network load + balancing resources such as backend services, target + pools, target instances, and instances with external IPs. + They filter requests before the request is served from the + application. + + This field can be set only at resource creation time. Check + the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. user_defined_fields (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyUserDefinedField]): @@ -114353,30 +128996,40 @@ class SecurityPolicy(proto.Message): extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values - for these fields. Example: userDefinedFields: - name: - "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 mask: - "0x1fff". + for these fields. + + Example: + + userDefinedFields: + + - name: "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 + mask: "0x1fff". """ class Type(proto.Enum): - r"""The type indicates the intended use of the security policy. - - CLOUD_ARMOR: Cloud Armor backend security policies can be configured - to filter incoming HTTP requests targeting backend services. They - filter requests before they hit the origin servers. - - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be - configured to filter incoming HTTP requests targeting backend - services (including Cloud CDN-enabled) as well as backend buckets - (Cloud Storage). They filter requests before the request is served - from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): - Cloud Armor internal service policies can be configured to filter - HTTP requests targeting services managed by Traffic Director in a - service mesh. They filter requests before the request is served from - the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies - can be configured to filter packets targeting network load balancing - resources such as backend services, target pools, target instances, - and instances with external IPs. They filter requests before the - request is served from the application. This field can be set only - at resource creation time. + r"""The type indicates the intended use of the security policy. + + :: + + - CLOUD_ARMOR: Cloud Armor backend security policies can + be configured to filter incoming HTTP requests targeting backend services. + They filter requests before they hit the origin servers. + - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can + be configured to filter incoming HTTP requests targeting backend services + (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). + They filter requests before the request is served from Google's cache. + - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor + internal service policies can be configured to filter HTTP requests + targeting services managed by Traffic Director in a service mesh. They + filter requests before the request is served from the application. + + - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be + configured to filter packets targeting network load balancing + resources such as backend services, target pools, target + instances, and instances with external IPs. They filter requests + before the request is served from the application. + + This field can be set only at resource creation time. Values: UNDEFINED_TYPE (0): @@ -114696,7 +129349,7 @@ class SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConf This field is a member of `oneof`_ ``_detection_relative_to_baseline_qps``. name (str): The name must be 1-63 characters long, and - comply with RFC1035. The name must be unique + comply withRFC1035. The name must be unique within the security policy. This field is a member of `oneof`_ ``_name``. @@ -114924,11 +129577,16 @@ class SecurityPolicyAdvancedOptionsConfigJsonCustomConfig(proto.Message): Attributes: content_types (MutableSequence[str]): A list of custom Content-Type header values to apply the - JSON parsing. As per RFC 1341, a Content-Type header value - has the following format: Content-Type := type "/" subtype - \*[";" parameter] When configuring a custom Content-Type - header value, only the type/subtype needs to be specified, - and the parameters should be excluded. + JSON parsing. + + As per RFC 1341, a Content-Type header value has the + following format: + + Content-Type := type "/" subtype \*[";" parameter] + + When configuring a custom Content-Type header value, only + the type/subtype needs to be specified, and the parameters + should be excluded. """ content_types: MutableSequence[str] = proto.RepeatedField( @@ -115062,14 +129720,15 @@ class SecurityPolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicy]): A list of SecurityPolicy resources. kind (str): - [Output Only] Type of resource. Always - compute#securityPolicyList for listsof securityPolicies + [Output Only] Type of resource. + Alwayscompute#securityPolicyList for listsof + securityPolicies This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -115168,26 +129827,31 @@ class SecurityPolicyRule(proto.Message): Attributes: action (str): The Action to perform when the rule is matched. The - following are the valid actions: - allow: allow access to - target. - deny(STATUS): deny access to target, returns the - HTTP response code specified. Valid values for ``STATUS`` - are 403, 404, and 502. - rate_based_ban: limit client - traffic to the configured threshold and ban the client if - the traffic exceeds the threshold. Configure parameters for - this action in RateLimitOptions. Requires rate_limit_options - to be set. - redirect: redirect to a different target. This - can either be an internal reCAPTCHA redirect, or an external - URL-based redirect via a 302 response. Parameters for this - action can be configured via redirectOptions. This action is - only supported in Global Security Policies of type - CLOUD_ARMOR. - throttle: limit client traffic to the - configured threshold. Configure parameters for this action - in rateLimitOptions. Requires rate_limit_options to be set - for this. - fairshare (preview only): when traffic reaches - the threshold limit, requests from the clients matching this - rule begin to be rate-limited using the Fair Share - algorithm. This action is only allowed in security policies - of type ``CLOUD_ARMOR_INTERNAL_SERVICE``. + following are the valid actions: + + :: + + - allow: allow access to target. + - deny(STATUS): deny access to target, returns the + HTTP response code specified. Valid values for `STATUS` + are 403, 404, and 502. + - rate_based_ban: limit client traffic to the configured + threshold and ban the client if the traffic exceeds the threshold. + Configure parameters for this action in RateLimitOptions. Requires + rate_limit_options to be set. + - redirect: redirect to a different target. This can + either be an internal reCAPTCHA redirect, or an external URL-based + redirect via a 302 response. Parameters for this action can be configured + via redirectOptions. This action is only supported in Global Security + Policies of type CLOUD_ARMOR. + - throttle: limit + client traffic to the configured threshold. Configure parameters for this + action in rateLimitOptions. Requires rate_limit_options to be set for + this. + - fairshare (preview only): when traffic reaches the + threshold limit, requests from the clients matching this rule begin to be + rate-limited using the Fair Share algorithm. This action is only allowed + in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. This field is a member of `oneof`_ ``_action``. description (str): @@ -115207,8 +129871,10 @@ class SecurityPolicyRule(proto.Message): logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on - "goto_next" rules. This field may only be specified when the - versioned_expr is set to FIREWALL. + "goto_next" rules. + + This field may only be specified when the versioned_expr is + set to FIREWALL. This field is a member of `oneof`_ ``_enable_logging``. header_action (google.cloud.compute_v1beta.types.SecurityPolicyRuleHttpHeaderAction): @@ -115218,8 +129884,8 @@ class SecurityPolicyRule(proto.Message): This field is a member of `oneof`_ ``_header_action``. kind (str): - [Output only] Type of the resource. Always - compute#securityPolicyRule for security policy rules + [Output only] Type of the resource. + Alwayscompute#securityPolicyRule for security policy rules This field is a member of `oneof`_ ``_kind``. match (google.cloud.compute_v1beta.types.SecurityPolicyRuleMatcher): @@ -115231,31 +129897,45 @@ class SecurityPolicyRule(proto.Message): network_match (google.cloud.compute_v1beta.types.SecurityPolicyRuleNetworkMatcher): A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it - matches, the corresponding 'action' is enforced. The match - criteria for a rule consists of built-in match fields (like - 'srcIpRanges') and potentially multiple user-defined match - fields ('userDefinedFields'). Field values may be extracted - directly from the packet or derived from it (e.g. - 'srcRegionCodes'). Some fields may not be present in every - packet (e.g. 'srcPorts'). A user-defined field is only - present if the base header is found in the packet and the - entire field is in bounds. Each match field may specify - which values can match it, listing one or more ranges, - prefixes, or exact values that are considered a match for - the field. A field value must be present in order to match a - specified match field. If no match values are specified for - a match field, then any field value is considered to match - it, and it's not required to be present. For strings - specifying '\*' is also equivalent to match all. For a - packet to match a rule, all specified match fields must - match the corresponding field values derived from the - packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - - "198.51.100.0/24" userDefinedFields: - name: - "ipv4_fragment_offset" values: - "1-0x1fff" The above match - condition matches packets with a source IP in 192.0.2.0/24 - or 198.51.100.0/24 and a user-defined field named - "ipv4_fragment_offset" with a value between 1 and 0x1fff - inclusive. + matches, the corresponding 'action' is enforced. + + The match criteria for a rule consists of built-in match + fields (like 'srcIpRanges') and potentially multiple + user-defined match fields ('userDefinedFields'). + + Field values may be extracted directly from the packet or + derived from it (e.g. 'srcRegionCodes'). Some fields may not + be present in every packet (e.g. 'srcPorts'). A user-defined + field is only present if the base header is found in the + packet and the entire field is in bounds. + + Each match field may specify which values can match it, + listing one or more ranges, prefixes, or exact values that + are considered a match for the field. A field value must be + present in order to match a specified match field. If no + match values are specified for a match field, then any field + value is considered to match it, and it's not required to be + present. For strings specifying '\*' is also equivalent to + match all. + + For a packet to match a rule, all specified match fields + must match the corresponding field values derived from the + packet. + + Example: + + networkMatch: srcIpRanges: + + - "192.0.2.0/24" + - "198.51.100.0/24" userDefinedFields: + - name: "ipv4_fragment_offset" values: + + - "1-0x1fff" + + The above match condition matches packets with a source IP + in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field + named "ipv4_fragment_offset" with a value between 1 and + 0x1fff inclusive. This field is a member of `oneof`_ ``_network_match``. preconfigured_waf_config (google.cloud.compute_v1beta.types.SecurityPolicyRulePreconfiguredWafConfig): @@ -115309,8 +129989,10 @@ class SecurityPolicyRule(proto.Message): A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the - organization will receive the rule. This field may only be - specified when versioned_expr is set to FIREWALL. + organization will receive the rule. + + This field may only be specified when versioned_expr is set + to FIREWALL. target_service_accounts (MutableSequence[str]): A list of service accounts indicating the sets of instances that are applied with this @@ -115565,10 +130247,13 @@ class SecurityPolicyRuleMatcherConfig(proto.Message): Attributes: dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. This field may only be specified when - versioned_expr is set to FIREWALL. + CIDR IP address range. + + This field may only be specified when versioned_expr is set + to FIREWALL. layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRuleMatcherConfigLayer4Config]): Pairs of IP protocols and ports that the rule should match. + This field may only be specified when versioned_expr is set to FIREWALL. src_ip_ranges (MutableSequence[str]): @@ -115603,8 +130288,8 @@ class SecurityPolicyRuleMatcherConfigLayer4Config(proto.Message): The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp), or the IP + the following well known protocol strings + (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP protocol number. This field is a member of `oneof`_ ``_ip_protocol``. @@ -115612,10 +130297,13 @@ class SecurityPolicyRuleMatcherConfigLayer4Config(proto.Message): An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. This - field may only be specified when versioned_expr is set to - FIREWALL. + rule applies to connections through any port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. + + This field may only be specified when versioned_expr is set + to FIREWALL. """ ip_protocol: str = proto.Field( @@ -115771,7 +130459,7 @@ class SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch(proto.Message): Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with "0x") number (e.g. "64") or range - (e.g. "0x400-0x7ff"). + (e.g. "0x400-0x7ff"). """ name: str = proto.Field( @@ -115969,43 +130657,50 @@ class SecurityPolicyRuleRateLimitOptions(proto.Message): This field is a member of `oneof`_ ``_conform_action``. enforce_on_key (str): Determines the key to enforce the rate_limit_threshold on. - Possible values are: - ALL: A single rate limit threshold is - applied to all the requests matching this rule. This is the - default value if "enforceOnKey" is not configured. - IP: The - source IP address of the request is the key. Each IP has - this limit enforced separately. - HTTP_HEADER: The value of - the HTTP header whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present - in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) - specified in the list of IPs under X-Forwarded-For HTTP - header. If no such header is present or the value is not a - valid IP, the key defaults to the source IP address of the - request i.e. key type IP. - HTTP_COOKIE: The value of the - HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present - in the request, the key type defaults to ALL. - HTTP_PATH: - The URL path of the HTTP request. The key value is truncated - to the first 128 bytes. - SNI: Server name indication in the - TLS session of the HTTPS request. The key value is truncated - to the first 128 bytes. The key type defaults to ALL on a - HTTP session. - REGION_CODE: The country/region from which - the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL - fingerprint if the client connects using HTTPS, HTTP/2 or - HTTP/3. If not available, the key type defaults to ALL. - - USER_IP: The IP address of the originating client, which is - resolved based on "userIpRequestHeaders" configured with the - security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, - the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 - TLS/SSL fingerprint if the client connects using HTTPS, - HTTP/2 or HTTP/3. If not available, the key type defaults to - ALL. For "fairshare" action, this value is limited to ALL - i.e. a single rate limit threshold is enforced for all the - requests matching the rule. Check the EnforceOnKey enum for - the list of possible values. + Possible values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKey" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the value + is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of the + HTTPS request. The key value is truncated to the first 128 bytes. The + key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the request + originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration or + an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, + the key type defaults to ALL. For "fairshare" action, this + value is limited to ALL i.e. a single rate limit threshold + is enforced for all the requests matching the rule. Check + the EnforceOnKey enum for the list of possible values. This field is a member of `oneof`_ ``_enforce_on_key``. enforce_on_key_configs (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig]): @@ -116049,38 +130744,49 @@ class SecurityPolicyRuleRateLimitOptions(proto.Message): class EnforceOnKey(proto.Enum): r"""Determines the key to enforce the rate_limit_threshold on. Possible - values are: - ALL: A single rate limit threshold is applied to all - the requests matching this rule. This is the default value if - "enforceOnKey" is not configured. - IP: The source IP address of the - request is the key. Each IP has this limit enforced separately. - - HTTP_HEADER: The value of the HTTP header whose name is configured - under "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present in the - request, the key type defaults to ALL. - XFF_IP: The first IP - address (i.e. the originating client IP address) specified in the - list of IPs under X-Forwarded-For HTTP header. If no such header is - present or the value is not a valid IP, the key defaults to the - source IP address of the request i.e. key type IP. - HTTP_COOKIE: - The value of the HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first 128 - bytes of the cookie value. If no such cookie is present in the - request, the key type defaults to ALL. - HTTP_PATH: The URL path of - the HTTP request. The key value is truncated to the first 128 bytes. - - SNI: Server name indication in the TLS session of the HTTPS - request. The key value is truncated to the first 128 bytes. The key - type defaults to ALL on a HTTP session. - REGION_CODE: The - country/region from which the request originates. - - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects - using HTTPS, HTTP/2 or HTTP/3. If not available, the key type - defaults to ALL. - USER_IP: The IP address of the originating - client, which is resolved based on "userIpRequestHeaders" configured - with the security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, the key - type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint - if the client connects using HTTPS, HTTP/2 or HTTP/3. If not - available, the key type defaults to ALL. For "fairshare" action, - this value is limited to ALL i.e. a single rate limit threshold is - enforced for all the requests matching the rule. + values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKey" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the value + is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of the + HTTPS request. The key value is truncated to the first 128 bytes. The + key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the request + originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration or + an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key + type defaults to ALL. For "fairshare" action, this value is + limited to ALL i.e. a single rate limit threshold is enforced for + all the requests matching the rule. Values: UNDEFINED_ENFORCE_ON_KEY (0): @@ -116192,77 +130898,95 @@ class SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig(proto.Message): This field is a member of `oneof`_ ``_enforce_on_key_name``. enforce_on_key_type (str): Determines the key to enforce the rate_limit_threshold on. - Possible values are: - ALL: A single rate limit threshold is - applied to all the requests matching this rule. This is the - default value if "enforceOnKeyConfigs" is not configured. - - IP: The source IP address of the request is the key. Each IP - has this limit enforced separately. - HTTP_HEADER: The value - of the HTTP header whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present - in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) - specified in the list of IPs under X-Forwarded-For HTTP - header. If no such header is present or the value is not a - valid IP, the key defaults to the source IP address of the - request i.e. key type IP. - HTTP_COOKIE: The value of the - HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present - in the request, the key type defaults to ALL. - HTTP_PATH: - The URL path of the HTTP request. The key value is truncated - to the first 128 bytes. - SNI: Server name indication in the - TLS session of the HTTPS request. The key value is truncated - to the first 128 bytes. The key type defaults to ALL on a - HTTP session. - REGION_CODE: The country/region from which - the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL - fingerprint if the client connects using HTTPS, HTTP/2 or - HTTP/3. If not available, the key type defaults to ALL. - - USER_IP: The IP address of the originating client, which is - resolved based on "userIpRequestHeaders" configured with the - security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, - the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 - TLS/SSL fingerprint if the client connects using HTTPS, - HTTP/2 or HTTP/3. If not available, the key type defaults to - ALL. Check the EnforceOnKeyType enum for the list of - possible values. + Possible values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKeyConfigs" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the + value is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of + the HTTPS request. The key value is truncated to the first 128 bytes. + The key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the + request originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration + or an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, + the key type defaults to ALL. Check the EnforceOnKeyType + enum for the list of possible values. This field is a member of `oneof`_ ``_enforce_on_key_type``. """ class EnforceOnKeyType(proto.Enum): r"""Determines the key to enforce the rate_limit_threshold on. Possible - values are: - ALL: A single rate limit threshold is applied to all - the requests matching this rule. This is the default value if - "enforceOnKeyConfigs" is not configured. - IP: The source IP address - of the request is the key. Each IP has this limit enforced - separately. - HTTP_HEADER: The value of the HTTP header whose name - is configured under "enforceOnKeyName". The key value is truncated - to the first 128 bytes of the header value. If no such header is - present in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) specified - in the list of IPs under X-Forwarded-For HTTP header. If no such - header is present or the value is not a valid IP, the key defaults - to the source IP address of the request i.e. key type IP. - - HTTP_COOKIE: The value of the HTTP cookie whose name is configured - under "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present in the - request, the key type defaults to ALL. - HTTP_PATH: The URL path of - the HTTP request. The key value is truncated to the first 128 bytes. - - SNI: Server name indication in the TLS session of the HTTPS - request. The key value is truncated to the first 128 bytes. The key - type defaults to ALL on a HTTP session. - REGION_CODE: The - country/region from which the request originates. - - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects - using HTTPS, HTTP/2 or HTTP/3. If not available, the key type - defaults to ALL. - USER_IP: The IP address of the originating - client, which is resolved based on "userIpRequestHeaders" configured - with the security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, the key - type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint - if the client connects using HTTPS, HTTP/2 or HTTP/3. If not - available, the key type defaults to ALL. + values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKeyConfigs" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the + value is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of + the HTTPS request. The key value is truncated to the first 128 bytes. + The key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the + request originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration + or an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key + type defaults to ALL. Values: UNDEFINED_ENFORCE_ON_KEY_TYPE (0): @@ -116362,20 +131086,29 @@ class SecurityPolicyRuleRedirectOptions(proto.Message): This field is a member of `oneof`_ ``_target``. type_ (str): - Type of the redirect action. Possible values are: - - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge - assessment. - EXTERNAL_302: redirect to a different URL via - a 302 response. Check the Type enum for the list of possible - values. + Type of the redirect action. Possible values are: + + :: + + - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual + challenge assessment. + - EXTERNAL_302: redirect to a different URL via a 302 + response. + + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): - r"""Type of the redirect action. Possible values are: - - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge - assessment. - EXTERNAL_302: redirect to a different URL via a 302 - response. + r"""Type of the redirect action. Possible values are: + + :: + + - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual + challenge assessment. + - EXTERNAL_302: redirect to a different URL via a 302 + response. Values: UNDEFINED_TYPE (0): @@ -116410,17 +131143,24 @@ class SecurityPolicyUserDefinedField(proto.Message): Attributes: base (str): The base relative to which 'offset' is - measured. Possible values are: - IPV4: Points to - the beginning of the IPv4 header. - IPV6: Points - to the beginning of the IPv6 header. - TCP: - Points to the beginning of the TCP header, - skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. - - UDP: Points to the beginning of the UDP header, - skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. - required Check the Base enum for the list of - possible values. + measured. Possible values are: + + - IPV4: Points to the beginning of the IPv4 + header. + - IPV6: Points to the beginning of the IPv6 + header. + - TCP: Points to the beginning of the TCP + header, skipping over any IPv4 options or + IPv6 extension headers. Not present for + non-first fragments. + - UDP: Points to the beginning of the UDP + header, skipping over any IPv4 options or + IPv6 extension headers. Not present for + non-first fragments. + + required + Check the Base enum for the list of possible + values. This field is a member of `oneof`_ ``_base``. mask (str): @@ -116451,13 +131191,18 @@ class SecurityPolicyUserDefinedField(proto.Message): class Base(proto.Enum): r"""The base relative to which 'offset' is measured. Possible - values are: - IPV4: Points to the beginning of the IPv4 header. - - IPV6: Points to the beginning of the IPv6 header. - TCP: - Points to the beginning of the TCP header, skipping over any - IPv4 options or IPv6 extension headers. Not present for - non-first fragments. - UDP: Points to the beginning of the UDP - header, skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. required + values are: + + - IPV4: Points to the beginning of the IPv4 header. + - IPV6: Points to the beginning of the IPv6 header. + - TCP: Points to the beginning of the TCP header, skipping + over any IPv4 options or IPv6 extension headers. Not present + for non-first fragments. + - UDP: Points to the beginning of the UDP header, skipping + over any IPv4 options or IPv6 extension headers. Not present + for non-first fragments. + + required Values: UNDEFINED_BASE (0): @@ -116528,28 +131273,32 @@ class SecuritySettings(proto.Message): Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service's backends. - clientTlsPolicy only applies to a global BackendService with - the loadBalancingScheme set to INTERNAL_SELF_MANAGED. If - left blank, communications are not encrypted. + + clientTlsPolicy only applies to a globalBackendService with + the loadBalancingScheme set to INTERNAL_SELF_MANAGED. + + If left blank, communications are not encrypted. This field is a member of `oneof`_ ``_client_tls_policy``. subject_alt_names (MutableSequence[str]): Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an - server/endpoint for this BackendService. When the server + server/endpoint for thisBackendService. When the server presents its X.509 certificate to the client, the client - inspects the certificate's subjectAltName field. If the - field contains one of the specified values, the - communication continues. Otherwise, it fails. This - additional check enables the client to verify that the - server is authorized to run the requested service. Note that - the contents of the server certificate's subjectAltName - field are configured by the Public Key Infrastructure which - provisions server identities. Only applies to a global - BackendService with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. Only applies when BackendService has - an attached clientTlsPolicy with clientCertificate (mTLS - mode). + inspects the certificate'ssubjectAltName field. If the field + contains one of the specified values, the communication + continues. Otherwise, it fails. This additional check + enables the client to verify that the server is authorized + to run the requested service. + + Note that the contents of the server certificate's + subjectAltName field are configured by the Public Key + Infrastructure which provisions server identities. + + Only applies to a global BackendService + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. Only + applies when BackendService has an attachedclientTlsPolicy + with clientCertificate (mTLS mode). """ authentication: str = proto.Field( @@ -116619,8 +131368,8 @@ class SerialPortOutput(proto.Message): This field is a member of `oneof`_ ``_contents``. kind (str): - [Output Only] Type of the resource. Always - compute#serialPortOutput for serial port output. + [Output Only] Type of the resource. + Alwayscompute#serialPortOutput for serial port output. This field is a member of `oneof`_ ``_kind``. next_ (int): @@ -116741,11 +131490,12 @@ class ServiceAccount(proto.Message): class ServiceAttachment(proto.Message): - r"""Represents a ServiceAttachment resource. A service attachment - represents a service that a producer has exposed. It - encapsulates the load balancer which fronts the service runs and - a list of NAT IP ranges that the producers uses to represent the - consumers connecting to the service. + r"""Represents a ServiceAttachment resource. + + A service attachment represents a service that a producer has + exposed. It encapsulates the load balancer which fronts the + service runs and a list of NAT IP ranges that the producers uses + to represent the consumers connecting to the service. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -116784,7 +131534,7 @@ class ServiceAttachment(proto.Message): attachment must contain either only projects or only networks. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -116826,8 +131576,8 @@ class ServiceAttachment(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#serviceAttachment for service attachments. + [Output Only] Type of the resource. + Alwayscompute#serviceAttachment for service attachments. This field is a member of `oneof`_ ``_kind``. metadata (MutableMapping[str, str]): @@ -116835,7 +131585,7 @@ class ServiceAttachment(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -116859,13 +131609,17 @@ class ServiceAttachment(proto.Message): Connectivity Center. This limit lets the service producer limit how many propagated Private Service Connect connections can be established to this service attachment - from a single consumer. If the connection preference of the - service attachment is ACCEPT_MANUAL, the limit applies to - each project or network that is listed in the consumer - accept list. If the connection preference of the service - attachment is ACCEPT_AUTOMATIC, the limit applies to each - project that contains a connected endpoint. If unspecified, - the default propagated connection limit is 250. + from a single consumer. + + If the connection preference of the service attachment is + ACCEPT_MANUAL, the limit applies to each project or network + that is listed in the consumer accept list. If the + connection preference of the service attachment is + ACCEPT_AUTOMATIC, the limit applies to each project that + contains a connected endpoint. + + If unspecified, the default propagated connection limit is + 250. This field is a member of `oneof`_ ``_propagated_connection_limit``. psc_service_attachment_id (google.cloud.compute_v1beta.types.Uint128): @@ -116877,16 +131631,23 @@ class ServiceAttachment(proto.Message): This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC - endpoints. - If false, connection policy update - will only affect existing PENDING PSC endpoints. - Existing ACCEPTED/REJECTED endpoints will remain - untouched regardless how the connection policy - is modified . - If true, update will affect both - PENDING and ACCEPTED/REJECTED PSC endpoints. For + endpoints. + + + - If false, connection policy update will + only affect existing PENDING PSC + endpoints. Existing ACCEPTED/REJECTED + endpoints will remain untouched regardless + how the connection policy is modified . + - If true, + update will affect both PENDING and + ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved - to REJECTED if its project is added to the - reject list. For newly created service - attachment, this boolean defaults to false. + to REJECTED if its project is added to the + reject list. + + For newly created service attachment, this + boolean defaults to false. This field is a member of `oneof`_ ``_reconcile_connections``. region (str): @@ -116907,10 +131668,16 @@ class ServiceAttachment(proto.Message): This field is a member of `oneof`_ ``_target_service``. tunneling_config (google.cloud.compute_v1beta.types.ServiceAttachmentTunnelingConfig): When a tunneling config is set on this service attachment it - will encapsulate traffic between consumer and producer. When - tunneling is enabled: - nat_subnets must be unset - - enable_proxy_protocol must be false - - producer_forwarding_rule must be a L4 ILB. - + will encapsulate traffic between consumer and producer. + + When tunneling is enabled: + + :: + + - nat_subnets must be unset + - enable_proxy_protocol must be false + - producer_forwarding_rule must be a L4 ILB. + - This field is a member of `oneof`_ ``_tunneling_config``. """ @@ -117073,7 +131840,7 @@ class ServiceAttachmentAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -117147,6 +131914,11 @@ class ServiceAttachmentConnectedEndpoint(proto.Message): The url of a connected endpoint. This field is a member of `oneof`_ ``_endpoint``. + endpoint_with_id (str): + The url of a connected endpoint with resource + id. + + This field is a member of `oneof`_ ``_endpoint_with_id``. nat_ips (MutableSequence[str]): NAT IPs of the connected PSC endpoint and those of other endpoints propagated from it. @@ -117215,6 +131987,11 @@ class Status(proto.Enum): number=130489749, optional=True, ) + endpoint_with_id: str = proto.Field( + proto.STRING, + number=444867210, + optional=True, + ) nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=117635086, @@ -117247,6 +132024,10 @@ class ServiceAttachmentConsumerProjectLimit(proto.Message): should be no more than 1. This field is a member of `oneof`_ ``_connection_limit``. + endpoint_url (str): + The URL for the PSC endpoint to accept + + This field is a member of `oneof`_ ``_endpoint_url``. network_url (str): The network URL for the network to set the limit for. @@ -117264,6 +132045,11 @@ class ServiceAttachmentConsumerProjectLimit(proto.Message): number=131403546, optional=True, ) + endpoint_url: str = proto.Field( + proto.STRING, + number=223428549, + optional=True, + ) network_url: str = proto.Field( proto.STRING, number=207194078, @@ -117290,14 +132076,14 @@ class ServiceAttachmentList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ServiceAttachment]): A list of ServiceAttachment resources. kind (str): - [Output Only] Type of the resource. Always - compute#serviceAttachment for service attachments. + [Output Only] Type of the resource. + Alwayscompute#serviceAttachment for service attachments. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -117476,21 +132262,25 @@ class SetAutoHealingPoliciesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -117540,17 +132330,21 @@ class SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -117594,17 +132388,21 @@ class SetBackendServiceTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_backend_service_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetBackendServiceRequest): @@ -117649,17 +132447,21 @@ class SetBackendServiceTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxies_set_backend_service_request_resource (google.cloud.compute_v1beta.types.TargetTcpProxiesSetBackendServiceRequest): @@ -117710,17 +132512,21 @@ class SetBackupTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -117774,17 +132580,21 @@ class SetCertificateMapTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_certificate_map_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetCertificateMapRequest): @@ -117830,17 +132640,21 @@ class SetCertificateMapTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_certificate_map_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetCertificateMapRequest): @@ -117888,17 +132702,21 @@ class SetCloudArmorTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118031,17 +132849,21 @@ class SetCommonInstanceMetadataProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118079,17 +132901,21 @@ class SetDefaultNetworkTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118130,17 +132956,21 @@ class SetDeletionProtectionInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -118197,17 +133027,21 @@ class SetDiskAutoDeleteInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -118260,17 +133094,21 @@ class SetEdgeSecurityPolicyBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -118316,17 +133154,21 @@ class SetEdgeSecurityPolicyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -118832,6 +133674,40 @@ class SetIamPolicyNodeTemplateRequest(proto.Message): ) +class SetIamPolicyRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.SetIamPolicy. See + the method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): + The body resource for this request + resource (str): + Name or id of the resource for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( + proto.MESSAGE, + number=276489091, + message="RegionSetPolicyRequest", + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + class SetIamPolicyRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.SetIamPolicy. See the method description for details. @@ -118969,38 +133845,79 @@ class SetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): ) -class SetIamPolicyRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.SetIamPolicy. See the +class SetIamPolicyRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.SetIamPolicy. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): + The body resource for this request + resource (str): + Name or id of the resource for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( + proto.MESSAGE, + number=276489091, + message="RegionSetPolicyRequest", + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class SetIamPolicyReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.SetIamPolicy. See the method description for details. Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. project (str): Project ID for this request. - region (str): - The name of the region for this request. - region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): - The body resource for this request resource (str): Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request """ - project: str = proto.Field( + parent_resource: str = proto.Field( proto.STRING, - number=227560217, + number=18091011, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, - ) - region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( - proto.MESSAGE, - number=276489091, - message="RegionSetPolicyRequest", + number=227560217, ) resource: str = proto.Field( proto.STRING, number=195806222, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + zone_set_nested_policy_request_resource: "ZoneSetNestedPolicyRequest" = proto.Field( + proto.MESSAGE, + number=266352851, + message="ZoneSetNestedPolicyRequest", + ) class SetIamPolicyReservationRequest(proto.Message): @@ -119037,6 +133954,47 @@ class SetIamPolicyReservationRequest(proto.Message): ) +class SetIamPolicyReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.SetIamPolicy. See + the method description for details. + + Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + """ + + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + zone_set_nested_policy_request_resource: "ZoneSetNestedPolicyRequest" = proto.Field( + proto.MESSAGE, + number=266352851, + message="ZoneSetNestedPolicyRequest", + ) + + class SetIamPolicyResourcePolicyRequest(proto.Message): r"""A request message for ResourcePolicies.SetIamPolicy. See the method description for details. @@ -119221,21 +134179,25 @@ class SetInstanceTemplateInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -119285,17 +134247,21 @@ class SetInstanceTemplateRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -119343,17 +134309,21 @@ class SetLabelsAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119399,17 +134369,21 @@ class SetLabelsDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119491,17 +134465,21 @@ class SetLabelsForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119635,17 +134613,21 @@ class SetLabelsInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -119691,17 +134673,21 @@ class SetLabelsInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119755,17 +134741,21 @@ class SetLabelsInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119871,17 +134861,21 @@ class SetLabelsRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119931,17 +134925,21 @@ class SetLabelsRegionInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119991,17 +134989,21 @@ class SetLabelsRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120051,17 +135053,21 @@ class SetLabelsRegionSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120167,17 +135173,21 @@ class SetLabelsTargetVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120227,17 +135237,21 @@ class SetLabelsVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120287,17 +135301,21 @@ class SetLabelsVpnTunnelRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120347,17 +135365,21 @@ class SetMachineResourcesInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120407,17 +135429,21 @@ class SetMachineTypeInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120467,17 +135493,21 @@ class SetManagedProtectionTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -120517,17 +135547,21 @@ class SetMetadataInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120577,17 +135611,21 @@ class SetMinCpuPlatformInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120637,17 +135675,21 @@ class SetNameInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120698,22 +135740,26 @@ class SetNamedPortsInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -120762,17 +135808,21 @@ class SetNamedPortsRegionInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -120820,17 +135870,21 @@ class SetNodeTemplateNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120878,17 +135932,21 @@ class SetPrivateIpGoogleAccessSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -120936,17 +135994,21 @@ class SetProxyHeaderTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_proxy_header_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetProxyHeaderRequest): @@ -120991,17 +136053,21 @@ class SetProxyHeaderTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxies_set_proxy_header_request_resource (google.cloud.compute_v1beta.types.TargetTcpProxiesSetProxyHeaderRequest): @@ -121046,17 +136112,21 @@ class SetQuicOverrideTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_quic_override_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetQuicOverrideRequest): @@ -121104,17 +136174,21 @@ class SetSchedulingInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. scheduling_resource (google.cloud.compute_v1beta.types.Scheduling): @@ -121166,17 +136240,21 @@ class SetSecurityPolicyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121224,17 +136302,21 @@ class SetSecurityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -121287,17 +136369,21 @@ class SetSecurityPolicyRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121343,17 +136429,21 @@ class SetSecurityPolicyTargetInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121407,17 +136497,21 @@ class SetSecurityPolicyTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121471,17 +136565,21 @@ class SetServiceAccountInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -121531,17 +136629,21 @@ class SetShieldedInstanceIntegrityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_instance_integrity_policy_resource (google.cloud.compute_v1beta.types.ShieldedInstanceIntegrityPolicy): @@ -121593,17 +136695,21 @@ class SetShieldedVmIntegrityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_vm_integrity_policy_resource (google.cloud.compute_v1beta.types.ShieldedVmIntegrityPolicy): @@ -121656,17 +136762,21 @@ class SetSslCertificatesRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -121713,17 +136823,21 @@ class SetSslCertificatesTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_ssl_certificates_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetSslCertificatesRequest): @@ -121768,17 +136882,21 @@ class SetSslCertificatesTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_ssl_certificates_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetSslCertificatesRequest): @@ -121823,17 +136941,21 @@ class SetSslPolicyTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_reference_resource (google.cloud.compute_v1beta.types.SslPolicyReference): @@ -121879,17 +137001,21 @@ class SetSslPolicyTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_reference_resource (google.cloud.compute_v1beta.types.SslPolicyReference): @@ -121937,17 +137063,21 @@ class SetTagsInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. tags_resource (google.cloud.compute_v1beta.types.Tags): @@ -122000,17 +137130,21 @@ class SetTargetForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_reference_resource (google.cloud.compute_v1beta.types.TargetReference): @@ -122059,17 +137193,21 @@ class SetTargetGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_reference_resource (google.cloud.compute_v1beta.types.TargetReference): @@ -122115,21 +137253,25 @@ class SetTargetPoolsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -122179,17 +137321,21 @@ class SetTargetPoolsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -122235,17 +137381,21 @@ class SetUrlMapRegionTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -122296,17 +137446,21 @@ class SetUrlMapRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -122355,17 +137509,21 @@ class SetUrlMapTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -122410,17 +137568,21 @@ class SetUrlMapTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -122465,17 +137627,21 @@ class SetUsageExportBucketProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. usage_export_location_resource (google.cloud.compute_v1beta.types.UsageExportLocation): @@ -122590,17 +137756,17 @@ class ShieldedInstanceConfig(proto.Message): Attributes: enable_integrity_monitoring (bool): Defines whether the instance has integrity - monitoring enabled. Enabled by default. + monitoring enabled.Enabled by default. This field is a member of `oneof`_ ``_enable_integrity_monitoring``. enable_secure_boot (bool): Defines whether the instance has Secure Boot - enabled. Disabled by default. + enabled.Disabled by default. This field is a member of `oneof`_ ``_enable_secure_boot``. enable_vtpm (bool): Defines whether the instance has the vTPM - enabled. Enabled by default. + enabled.Enabled by default. This field is a member of `oneof`_ ``_enable_vtpm``. """ @@ -122628,6 +137794,18 @@ class ShieldedInstanceIdentity(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + ecc_p256_encryption_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): + An Endorsement Key (EK) made by the ECC P256 + algorithm issued to the Shielded Instance's + vTPM. + + This field is a member of `oneof`_ ``_ecc_p256_encryption_key``. + ecc_p256_signing_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): + An Attestation Key (AK) made by the ECC P256 + algorithm issued to the Shielded Instance's + vTPM. + + This field is a member of `oneof`_ ``_ecc_p256_signing_key``. encryption_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's @@ -122635,8 +137813,8 @@ class ShieldedInstanceIdentity(proto.Message): This field is a member of `oneof`_ ``_encryption_key``. kind (str): - [Output Only] Type of the resource. Always - compute#shieldedInstanceIdentity for shielded Instance + [Output Only] Type of the resource. + Alwayscompute#shieldedInstanceIdentity for shielded Instance identity entry. This field is a member of `oneof`_ ``_kind``. @@ -122648,6 +137826,18 @@ class ShieldedInstanceIdentity(proto.Message): This field is a member of `oneof`_ ``_signing_key``. """ + ecc_p256_encryption_key: "ShieldedInstanceIdentityEntry" = proto.Field( + proto.MESSAGE, + number=469607365, + optional=True, + message="ShieldedInstanceIdentityEntry", + ) + ecc_p256_signing_key: "ShieldedInstanceIdentityEntry" = proto.Field( + proto.MESSAGE, + number=477678403, + optional=True, + message="ShieldedInstanceIdentityEntry", + ) encryption_key: "ShieldedInstanceIdentityEntry" = proto.Field( proto.MESSAGE, number=488268707, @@ -122697,8 +137887,8 @@ class ShieldedInstanceIdentityEntry(proto.Message): class ShieldedInstanceIntegrityPolicy(proto.Message): - r"""The policy describes the baseline against which Instance boot - integrity is measured. + r"""The policy describes the baseline against which + Instance boot integrity is measured. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -122771,8 +137961,9 @@ class ShieldedVmIdentity(proto.Message): This field is a member of `oneof`_ ``_encryption_key``. kind (str): - [Output Only] Type of the resource. Always - compute#shieldedVmIdentity for shielded VM identity entry. + [Output Only] Type of the resource. + Alwayscompute#shieldedVmIdentity for shielded VM identity + entry. This field is a member of `oneof`_ ``_kind``. signing_key (google.cloud.compute_v1beta.types.ShieldedVmIdentityEntry): @@ -122831,8 +138022,8 @@ class ShieldedVmIdentityEntry(proto.Message): class ShieldedVmIntegrityPolicy(proto.Message): - r"""The policy describes the baseline against which VM instance - boot integrity is measured. + r"""The policy describes the baseline against which + VM instance boot integrity is measured. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -122863,7 +138054,7 @@ class SignedUrlKey(proto.Message): Attributes: key_name (str): Name of the key. The name must be 1-63 characters long, and - comply with RFC1035. Specifically, the name must be 1-63 + comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -122873,7 +138064,7 @@ class SignedUrlKey(proto.Message): This field is a member of `oneof`_ ``_key_name``. key_value (str): 128-bit key value used for signing the URL. - The key value must be a valid RFC 4648 Section 5 + The key value must be a validRFC 4648 Section 5 base64url encoded string. This field is a member of `oneof`_ ``_key_value``. @@ -122908,17 +138099,21 @@ class SimulateMaintenanceEventInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. with_extended_notifications (bool): @@ -122975,17 +138170,21 @@ class SimulateMaintenanceEventNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -123017,9 +138216,11 @@ class SimulateMaintenanceEventNodeGroupRequest(proto.Message): class Snapshot(proto.Message): - r"""Represents a Persistent Disk Snapshot resource. You can use - snapshots to back up data on a regular interval. For more - information, read Creating persistent disk snapshots. + r"""Represents a Persistent Disk Snapshot resource. + + You can use snapshots to back up data on a regular interval. For + more information, read Creating + persistent disk snapshots. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -123054,7 +138255,7 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_creation_size_bytes``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -123108,15 +138309,16 @@ class Snapshot(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a snapshot. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a snapshot. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this snapshot. These can - be later modified by the setLabels method. Label - values may be empty. + be later modified by the setLabels method. + Label values may be empty. license_codes (MutableSequence[int]): [Output Only] Integer license codes indicating which licenses are attached to this snapshot. @@ -123126,15 +138328,15 @@ class Snapshot(proto.Message): licenses attached (such as a Windows image). location_hint (str): An opaque location hint used to place the - snapshot close to other resources. This field is - for use by internal tools that use the public - API. + snapshot close to other resources. + This field is for use by internal tools that use + the public API. This field is a member of `oneof`_ ``_location_hint``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -123165,15 +138367,19 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_self_link``. snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the snapshot using a - customer-supplied encryption key. After you - encrypt a snapshot using a customer-supplied - key, you must provide the same key if you use - the snapshot later. For example, you must - provide the encryption key when you create a - disk from the encrypted snapshot in a future - request. Customer-supplied encryption keys do - not protect access to metadata of the snapshot. + Encrypts the snapshot using + acustomer-supplied encryption key. + + After you encrypt a snapshot using a + customer-supplied key, you must provide the same + key if you use the snapshot later. For example, + you must provide the encryption key when you + create a disk from the encrypted snapshot in a + future request. + + Customer-supplied encryption keys do not protect + access to metadata of the snapshot. + If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key @@ -123192,9 +138398,10 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_source_disk``. source_disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + The customer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_source_disk_encryption_key``. source_disk_for_recovery_checkpoint (str): @@ -123213,11 +138420,14 @@ class Snapshot(proto.Message): The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instantSnapshots/instantSnapshot - - projects/project/zones/zone/instantSnapshots/instantSnapshot - - zones/zone/instantSnapshots/instantSnapshot + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot + - + projects/project/zones/zone/instantSnapshots/instantSnapshot + - zones/zone/instantSnapshots/instantSnapshot This field is a member of `oneof`_ ``_source_instant_snapshot``. source_instant_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): @@ -123246,8 +138456,8 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_source_snapshot_schedule_policy_id``. status (str): - [Output Only] The status of the snapshot. This can be - CREATING, DELETING, FAILED, READY, or UPLOADING. Check the + [Output Only] The status of the snapshot. This can + beCREATING, DELETING, FAILED,READY, or UPLOADING. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -123313,8 +138523,8 @@ class SnapshotType(proto.Enum): STANDARD = 484642493 class Status(proto.Enum): - r"""[Output Only] The status of the snapshot. This can be CREATING, - DELETING, FAILED, READY, or UPLOADING. + r"""[Output Only] The status of the snapshot. This can beCREATING, + DELETING, FAILED,READY, or UPLOADING. Values: UNDEFINED_STATUS (0): @@ -123577,15 +138787,15 @@ class SnapshotAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SnapshotsScopedList]): A list of SnapshotsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#snapshotAggregatedList for aggregated lists of + [Output Only] Type of resource. + Alwayscompute#snapshotAggregatedList for aggregated lists of snapshots. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -123670,7 +138880,7 @@ class SnapshotList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -123967,20 +139177,23 @@ class SourceDiskEncryptionKey(proto.Message): Attributes: disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + Thecustomer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_disk_encryption_key``. source_disk (str): URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk + values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk This field is a member of `oneof`_ ``_source_disk``. """ @@ -124035,7 +139248,7 @@ class SourceInstanceProperties(proto.Message): their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave - this set to false. See the Enable IP forwarding + this set tofalse. See theEnable IP forwarding documentation for more information. This field is a member of `oneof`_ ``_can_ip_forward``. @@ -124079,7 +139292,7 @@ class SourceInstanceProperties(proto.Message): The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom - metadata or predefined keys. See Project and + metadata or predefined keys. SeeProject and instance metadata for more information. This field is a member of `oneof`_ ``_metadata``. @@ -124089,7 +139302,7 @@ class SourceInstanceProperties(proto.Message): may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: - "Intel Haswell" or minCpuPlatform: "Intel Sandy + "Intel Haswell" orminCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform. @@ -124121,7 +139334,7 @@ class SourceInstanceProperties(proto.Message): identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must - comply with RFC1035. + comply withRFC1035. This field is a member of `oneof`_ ``_tags``. """ @@ -124249,22 +139462,35 @@ class PostKeyRevocationActionType(proto.Enum): class SslCertificate(proto.Message): - r"""Represents an SSL certificate resource. Google Compute Engine has - two SSL certificate resources: \* - `Global `__ \* - `Regional `__ - The global SSL certificates (sslCertificates) are used by: - Global - external Application Load Balancers - Classic Application Load - Balancers - Proxy Network Load Balancers (with target SSL proxies) - The regional SSL certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional internal - Application Load Balancers Optionally, certificate file contents - that you upload can contain a set of up to five PEM-encoded - certificates. The API call creates an object (sslCertificate) that - holds this data. You can use SSL keys and certificates to secure - connections to a load balancer. For more information, read Creating - and using SSL certificates, SSL certificates quotas and limits, and - Troubleshooting SSL certificates. + r"""Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + + The global SSL certificates (sslCertificates) are used by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload can contain a + set of up to five PEM-encoded certificates. The API call creates an + object (sslCertificate) that holds this data. You can use SSL keys + and certificates to secure connections to a load balancer. For more + information, read Creating and using SSL certificates,SSL + certificates quotas and limits, and Troubleshooting SSL + certificates. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -124279,7 +139505,7 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_certificate``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -124298,8 +139524,8 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#sslCertificate for SSL certificates. + [Output Only] Type of the resource. + Alwayscompute#sslCertificate for SSL certificates. This field is a member of `oneof`_ ``_kind``. managed (google.cloud.compute_v1beta.types.SslCertificateManagedSslCertificate): @@ -124310,7 +139536,7 @@ class SslCertificate(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -124346,7 +139572,7 @@ class SslCertificate(proto.Message): type_ (str): (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the - certificate is self-managed and the fields certificate and + certificate is self-managed and the fieldscertificate and private_key are used. Check the Type enum for the list of possible values. @@ -124356,7 +139582,7 @@ class SslCertificate(proto.Message): class Type(proto.Enum): r"""(Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is - self-managed and the fields certificate and private_key are used. + self-managed and the fieldscertificate and private_key are used. Values: UNDEFINED_TYPE (0): @@ -124462,15 +139688,15 @@ class SslCertificateAggregatedList(proto.Message): A list of SslCertificatesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#sslCertificateAggregatedList for lists of SSL + [Output Only] Type of resource. + Alwayscompute#sslCertificateAggregatedList for lists of SSL Certificates. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -124550,7 +139776,7 @@ class SslCertificateList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -124759,14 +139985,15 @@ class SslPoliciesAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SslPoliciesScopedList]): A list of SslPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#sslPolicyAggregatedList for lists of SSL Policies. + [Output Only] Type of resource. + Alwayscompute#sslPolicyAggregatedList for lists of SSL + Policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -124845,14 +140072,14 @@ class SslPoliciesList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.SslPolicy]): A list of SslPolicy resources. kind (str): - [Output Only] Type of the resource. Always - compute#sslPoliciesList for lists of sslPolicies. + [Output Only] Type of the resource. + Alwayscompute#sslPoliciesList for lists of sslPolicies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -124949,25 +140176,27 @@ class SslPoliciesScopedList(proto.Message): class SslPolicy(proto.Message): - r"""Represents an SSL Policy resource. Use SSL policies to - control SSL features, such as versions and cipher suites, that - are offered by Application Load Balancers and proxy Network Load - Balancers. For more information, read SSL policies overview. + r"""Represents an SSL Policy resource. + + Use SSL policies to control SSL features, such as versions and + cipher suites, that are offered by Application Load Balancers + and proxy Network Load Balancers. For more information, read + SSL policies overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. custom_features (MutableSequence[str]): A list of features enabled when the selected - profile is CUSTOM. The method returns the set of - features that can be specified in this list. - This field must be empty if the profile is not - CUSTOM. + profile is CUSTOM. The method returns the set + of features that can be specified in this list. + This field must be empty if the profile is + notCUSTOM. description (str): An optional description of this resource. Provide this property when you create the @@ -124984,9 +140213,10 @@ class SslPolicy(proto.Message): ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve an SslPolicy. + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an SslPolicy. This field is a member of `oneof`_ ``_fingerprint``. id (int): @@ -124995,15 +140225,17 @@ class SslPolicy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#sslPolicyfor SSL policies. + [Output only] Type of the resource. + Alwayscompute#sslPolicyfor SSL policies. This field is a member of `oneof`_ ``_kind``. min_tls_version (str): The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. - This can be one of TLS_1_0, TLS_1_1, TLS_1_2. Check the - MinTlsVersion enum for the list of possible values. + This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When + set to TLS_1_3, the profile field must be set to RESTRICTED. + Check the MinTlsVersion enum for the list of possible + values. This field is a member of `oneof`_ ``_min_tls_version``. name (str): @@ -125019,8 +140251,8 @@ class SslPolicy(proto.Message): profile (str): Profile specifies the set of SSL features that can be used by the load balancer when - negotiating SSL with clients. This can be one of - COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If + negotiating SSL with clients. This can be one + ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features to enable must be specified in the customFeatures field. Check the Profile enum for the list of possible @@ -125045,8 +140277,9 @@ class SslPolicy(proto.Message): class MinTlsVersion(proto.Enum): r"""The minimum version of SSL protocol that can be used by the clients - to establish a connection with the load balancer. This can be one of - TLS_1_0, TLS_1_1, TLS_1_2. + to establish a connection with the load balancer. This can be one + ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the + profile field must be set to RESTRICTED. Values: UNDEFINED_MIN_TLS_VERSION (0): @@ -125058,18 +140291,21 @@ class MinTlsVersion(proto.Enum): TLS 1.1 TLS_1_2 (33116736): TLS 1.2 + TLS_1_3 (33116737): + TLS 1.3 """ UNDEFINED_MIN_TLS_VERSION = 0 TLS_1_0 = 33116734 TLS_1_1 = 33116735 TLS_1_2 = 33116736 + TLS_1_3 = 33116737 class Profile(proto.Enum): r"""Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be - one of COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using - CUSTOM, the set of SSL features to enable must be specified in - the customFeatures field. + one ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, + the set of SSL features to enable must be specified in the + customFeatures field. Values: UNDEFINED_PROFILE (0): @@ -125084,6 +140320,10 @@ class Profile(proto.Enum): Custom profile. Allow only the set of allowed SSL features specified in the customFeatures field. + FIPS_202205 (475828188): + FIPS compatible profile. Supports a reduced + set of SSL features, intended to meet FIPS 140-3 + compliance requirements. MODERN (132013855): Modern profile. Supports a wide set of SSL features, allowing modern clients to negotiate @@ -125096,6 +140336,7 @@ class Profile(proto.Enum): UNDEFINED_PROFILE = 0 COMPATIBLE = 179357396 CUSTOM = 388595569 + FIPS_202205 = 475828188 MODERN = 132013855 RESTRICTED = 261551195 @@ -125204,17 +140445,21 @@ class StartAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125266,17 +140511,21 @@ class StartAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125322,17 +140571,21 @@ class StartInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125377,21 +140630,25 @@ class StartInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -125441,17 +140698,21 @@ class StartInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125499,17 +140760,21 @@ class StartWithEncryptionKeyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125617,7 +140882,7 @@ class StatefulPolicyPreservedStateDiskDevice(proto.Message): flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached - in READ_ONLY mode cannot be auto-deleted. Check the + inREAD_ONLY mode cannot be auto-deleted. Check the AutoDelete enum for the list of possible values. This field is a member of `oneof`_ ``_auto_delete``. @@ -125628,7 +140893,7 @@ class AutoDelete(proto.Enum): update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is - deleted. Note: disks attached in READ_ONLY mode cannot be + deleted. Note: disks attached inREAD_ONLY mode cannot be auto-deleted. Values: @@ -125664,18 +140929,19 @@ class StatefulPolicyPreservedStateNetworkIp(proto.Message): configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group - is deleted. Check the AutoDelete enum for the - list of possible values. + is deleted. + Check the AutoDelete enum for the list of + possible values. This field is a member of `oneof`_ ``_auto_delete``. """ class AutoDelete(proto.Enum): r"""These stateful IPs will never be released during autohealing, - update or VM instance recreate operations. This flag is used to - configure if the IP reservation should be deleted after it is no - longer used by the group, e.g. when the given instance or the - whole group is deleted. + update or VM instance recreate operations. + This flag is used to configure if the IP reservation should be + deleted after it is no longer used by the group, e.g. when the + given instance or the whole group is deleted. Values: UNDEFINED_AUTO_DELETE (0): @@ -125702,8 +140968,10 @@ class Status(proto.Message): for different programming environments, including REST APIs and RPC APIs. It is used by `gRPC `__. Each ``Status`` message contains three pieces of data: error code, error - message, and error details. You can find out more about this error - model and how to work with it in the `API Design + message, and error details. + + You can find out more about this error model and how to work with it + in the `API Design Guide `__. @@ -125717,7 +140985,7 @@ class Status(proto.Message): This field is a member of `oneof`_ ``_code``. details (MutableSequence[google.protobuf.any_pb2.Any]): A list of messages that carry the error - details. There is a common set of message types + details. There is a common set of message types for APIs to use. message (str): A developer-facing error message, which @@ -125763,17 +141031,21 @@ class StopAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125818,17 +141090,21 @@ class StopAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125869,17 +141145,21 @@ class StopGroupAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125929,17 +141209,21 @@ class StopGroupAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125993,17 +141277,21 @@ class StopInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -126058,21 +141346,25 @@ class StopInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -126122,17 +141414,21 @@ class StopInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -126174,7 +141470,7 @@ class StoragePool(proto.Message): This field is a member of `oneof`_ ``_capacity_provisioning_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -126202,9 +141498,10 @@ class StoragePool(proto.Message): to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a storage pool. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a storage pool. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): @@ -126213,7 +141510,7 @@ class StoragePool(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -126262,10 +141559,16 @@ class StoragePool(proto.Message): This field is a member of `oneof`_ ``_self_link_with_id``. state (str): - [Output Only] The status of storage pool creation. - - CREATING: Storage pool is provisioning. storagePool. - - FAILED: Storage pool creation failed. - READY: Storage pool - is ready for use. - DELETING: Storage pool is deleting. + [Output Only] The status of storage pool creation. + + :: + + - CREATING: Storage pool is provisioning. + storagePool. + - FAILED: Storage pool creation failed. + - READY: Storage pool is ready for use. + - DELETING: Storage pool is deleting. + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. @@ -126305,9 +141608,9 @@ class CapacityProvisioningType(proto.Enum): class PerformanceProvisioningType(proto.Enum): r"""Provisioning type of the performance-related parameters of - the pool, such as throughput and IOPS. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + the pool, such as throughput and IOPS. + Additional supported values which may be not listed in the enum + directly due to technical reasons: ADVANCED STANDARD @@ -126321,10 +141624,15 @@ class PerformanceProvisioningType(proto.Enum): UNDEFINED_PERFORMANCE_PROVISIONING_TYPE = 0 class State(proto.Enum): - r"""[Output Only] The status of storage pool creation. - CREATING: - Storage pool is provisioning. storagePool. - FAILED: Storage pool - creation failed. - READY: Storage pool is ready for use. - DELETING: - Storage pool is deleting. + r"""[Output Only] The status of storage pool creation. + + :: + + - CREATING: Storage pool is provisioning. + storagePool. + - FAILED: Storage pool creation failed. + - READY: Storage pool is ready for use. + - DELETING: Storage pool is deleting. Values: UNDEFINED_STATE (0): @@ -126461,15 +141769,15 @@ class StoragePoolAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.StoragePoolsScopedList]): A list of StoragePoolsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolAggregatedList for aggregated lists of - storage pools. + [Output Only] Type of resource. + Alwayscompute#storagePoolAggregatedList for aggregated lists + of storage pools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -126543,7 +141851,7 @@ class StoragePoolDisk(proto.Message): attached_instances (MutableSequence[str]): [Output Only] Instances this disk is attached to. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. disk (str): @@ -126692,7 +142000,7 @@ class StoragePoolList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -126774,15 +142082,15 @@ class StoragePoolListDisks(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.StoragePoolDisk]): A list of StoragePoolDisk resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolListDisks for lists of disks in a + [Output Only] Type of resource. + Alwayscompute#storagePoolListDisks for lists of disks in a storagePool. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -126858,8 +142166,8 @@ class StoragePoolResourceStatus(proto.Message): This field is a member of `oneof`_ ``_disk_count``. last_resize_timestamp (str): - [Output Only] Timestamp of the last successful resize in - RFC3339 text format. + [Output Only] Timestamp of the last successful resize + inRFC3339 text format. This field is a member of `oneof`_ ``_last_resize_timestamp``. max_total_provisioned_disk_capacity_gb (int): @@ -126967,7 +142275,7 @@ class StoragePoolType(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -126985,8 +142293,8 @@ class StoragePoolType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#storagePoolType for storage pool types. + [Output Only] Type of the resource. + Alwayscompute#storagePoolType for storage pool types. This field is a member of `oneof`_ ``_kind``. max_pool_provisioned_capacity_gb (int): @@ -127145,14 +142453,14 @@ class StoragePoolTypeAggregatedList(proto.Message): A list of StoragePoolTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolTypeAggregatedList . + [Output Only] Type of resource. + Alwayscompute#storagePoolTypeAggregatedList. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -127220,14 +142528,14 @@ class StoragePoolTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.StoragePoolType]): A list of StoragePoolType resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolTypeList for storage pool types. + [Output Only] Type of resource. + Alwayscompute#storagePoolTypeList for storage pool types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -127357,11 +142665,12 @@ class StructuredEntries(proto.Message): class Subnetwork(proto.Message): - r"""Represents a Subnetwork resource. A subnetwork (also known as - a subnet) is a logical partition of a Virtual Private Cloud - network with one primary IP range and zero or more secondary IP - ranges. For more information, read Virtual Private Cloud (VPC) - Network. + r"""Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is a logical partition of + a Virtual Private Cloud network with one primary IP range and + zero or more secondary IP ranges. For more information, read + Virtual Private Cloud (VPC) Network. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -127372,23 +142681,30 @@ class Subnetwork(proto.Message): static routes. Setting this to true allows this subnetwork's primary and secondary ranges to overlap with (and contain) static routes that have already been configured on the - corresponding network. For example if a static route has - range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be - created if allow_conflicting_routes=true. Overlapping is - only allowed on subnetwork operations; routes whose ranges - conflict with this subnetwork's ranges won't be allowed - unless route.allow_conflicting_subnetworks is set to true. + corresponding network. + + For example if a static route has range 10.1.0.0/16, a + subnet range 10.0.0.0/8 could only be created if + allow_conflicting_routes=true. + + Overlapping is only allowed on subnetwork operations; routes + whose ranges conflict with this subnetwork's ranges won't be + allowed unless route.allow_conflicting_subnetworks is set to + true. + Typically packets destined to IPs within the subnetwork (which may contain private/sensitive data) are prevented from leaving the virtual network. Setting this field to true - will disable this feature. The default value is false and - applies to all existing subnetworks and automatically - created subnetworks. This field cannot be set to true at - resource creation time. + will disable this feature. + + The default value is false and applies to all existing + subnetworks and automatically created subnetworks. + + This field cannot be set to true at resource creation time. This field is a member of `oneof`_ ``_allow_subnet_cidr_routes_overlap``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -127404,7 +142720,7 @@ class Subnetwork(proto.Message): listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the - subnet purpose field is set to REGIONAL_MANAGED_PROXY. + subnet purpose field is set toREGIONAL_MANAGED_PROXY. This field is a member of `oneof`_ ``_enable_flow_logs``. external_ipv6_prefix (str): @@ -127419,9 +142735,10 @@ class Subnetwork(proto.Message): ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve a Subnetwork. + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a Subnetwork. This field is a member of `oneof`_ ``_fingerprint``. gateway_address (str): @@ -127442,28 +142759,36 @@ class Subnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. Provide this property - when you create the subnetwork. For example, - 10.0.0.0/8 or 100.64.0.0/10. Ranges must be - unique and non-overlapping within a network. + when you create the subnetwork. For + example,10.0.0.0/8 or 100.64.0.0/10. Ranges must + be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any - range listed in the Valid ranges list. The range - can be expanded after creation using - expandIpCidrRange. + range listed in theValid + ranges list. The range can be expanded after + creation usingexpandIpCidrRange. This field is a member of `oneof`_ ``_ip_cidr_range``. ip_collection (str): Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in - EXTERNAL_IPV6_SUBNETWORK_CREATION mode. Use one of the - following formats to specify a sub-PDP when creating a dual - stack subnetwork with external access using BYOIP: - Full - resource URL, as in - https://www.googleapis.com/compute/v1/projects/projectId/regions/region - /publicDelegatedPrefixes/sub-pdp-name - Partial URL, as in - - projects/projectId/regions/region/publicDelegatedPrefixes/ - sub-pdp-name - - regions/region/publicDelegatedPrefixes/sub-pdp-name + EXTERNAL_IPV6_SUBNETWORK_CREATION or + INTERNAL_IPV6_SUBNETWORK_CREATION mode. + + Use one of the following formats to specify a sub-PDP when + creating a dual stack or IPv6-only subnetwork with external + access using BYOIP: + + :: + + - + Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name + - + Partial URL, as in + + + - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name + - regions/region/publicDelegatedPrefixes/sub-pdp-name This field is a member of `oneof`_ ``_ip_collection``. ipv6_access_type (str): @@ -127480,16 +142805,20 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_ipv6_cidr_range``. ipv6_gce_endpoint (str): [Output Only] Possible endpoints of this subnetwork. It can - be one of the following: - VM_ONLY: The subnetwork can be - used for creating instances and IPv6 addresses with VM - endpoint type. Such a subnetwork gets external IPv6 ranges - from a public delegated prefix and cannot be used to create - NetLb. - VM_AND_FR: The subnetwork can be used for creating - both VM instances and Forwarding Rules. It can also be used - to reserve IPv6 addresses with both VM and FR endpoint - types. Such a subnetwork gets its IPv6 range from Google IP - Pool directly. Check the Ipv6GceEndpoint enum for the list - of possible values. + be one of the following: + + :: + + - VM_ONLY: The subnetwork can be used for creating instances and + IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 + ranges from a public delegated prefix and cannot be used to create NetLb. + - VM_AND_FR: The subnetwork can be used for creating both VM + instances and Forwarding Rules. It can also be used to reserve IPv6 + addresses with both VM and FR endpoint types. Such a subnetwork gets its + IPv6 range from Google IP Pool directly. + + Check the Ipv6GceEndpoint enum for the list of possible + values. This field is a member of `oneof`_ ``_ipv6_gce_endpoint``. kind (str): @@ -127506,7 +142835,7 @@ class Subnetwork(proto.Message): name (str): The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 - characters long, and comply with RFC1035. Specifically, the + characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -127535,9 +142864,10 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_private_ip_google_access``. private_ipv6_google_access (str): - This field is for internal use. This field - can be both set at resource creation time and - updated using patch. Check the + This field is for internal use. + + This field can be both set at resource creation + time and updated usingpatch. Check the PrivateIpv6GoogleAccess enum for the list of possible values. @@ -127565,8 +142895,8 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_resolve_subnet_mask``. role (str): The role of subnetwork. Currently, this field is only used - when purpose is set to GLOBAL_MANAGED_PROXY or - REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + when purpose is set to GLOBAL_MANAGED_PROXY + orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or @@ -127582,29 +142912,30 @@ class Subnetwork(proto.Message): belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be - updated with a patch request. + updated with apatch request. self_link (str): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. stack_type (str): The stack type for the subnet. If set to IPV4_ONLY, new VMs - in the subnet are assigned IPv4 addresses only. If set to - IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 + in the subnet are assigned IPv4 addresses only. If set + toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. + This field can be both set at resource creation time and - updated using patch. Check the StackType enum for the list - of possible values. + updated usingpatch. Check the StackType enum for the list of + possible values. This field is a member of `oneof`_ ``_stack_type``. state (str): [Output Only] The state of the subnetwork, which can be one - of the following values: READY: Subnetwork is created and - ready to use DRAINING: only applicable to subnetworks that + of the following values:READY: Subnetwork is created and + ready to useDRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or - modified until it reaches a status of READY Check the State + modified until it reaches a status ofREADY Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. @@ -127651,14 +142982,17 @@ class Ipv6AccessType(proto.Enum): class Ipv6GceEndpoint(proto.Enum): r"""[Output Only] Possible endpoints of this subnetwork. It can be one - of the following: - VM_ONLY: The subnetwork can be used for creating - instances and IPv6 addresses with VM endpoint type. Such a - subnetwork gets external IPv6 ranges from a public delegated prefix - and cannot be used to create NetLb. - VM_AND_FR: The subnetwork can - be used for creating both VM instances and Forwarding Rules. It can - also be used to reserve IPv6 addresses with both VM and FR endpoint - types. Such a subnetwork gets its IPv6 range from Google IP Pool - directly. + of the following: + + :: + + - VM_ONLY: The subnetwork can be used for creating instances and + IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 + ranges from a public delegated prefix and cannot be used to create NetLb. + - VM_AND_FR: The subnetwork can be used for creating both VM + instances and Forwarding Rules. It can also be used to reserve IPv6 + addresses with both VM and FR endpoint types. Such a subnetwork gets its + IPv6 range from Google IP Pool directly. Values: UNDEFINED_IPV6_GCE_ENDPOINT (0): @@ -127674,8 +143008,10 @@ class Ipv6GceEndpoint(proto.Enum): VM_ONLY = 236773428 class PrivateIpv6GoogleAccess(proto.Enum): - r"""This field is for internal use. This field can be both set at - resource creation time and updated using patch. + r"""This field is for internal use. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS (0): @@ -127760,9 +143096,9 @@ class ResolveSubnetMask(proto.Enum): class Role(proto.Enum): r"""The role of subnetwork. Currently, this field is only used when - purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. - The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is - one that is currently being used for Envoy-based load balancers in a + purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The + value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one + that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. @@ -127783,10 +143119,12 @@ class Role(proto.Enum): class StackType(proto.Enum): r"""The stack type for the subnet. If set to IPV4_ONLY, new VMs in the - subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new - VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If - not specified, IPV4_ONLY is used. This field can be both set at - resource creation time and updated using patch. + subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs + in the subnet can be assigned both IPv4 and IPv6 addresses. If not + specified, IPV4_ONLY is used. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_STACK_TYPE (0): @@ -127799,7 +143137,7 @@ class StackType(proto.Enum): New VMs in this subnet will only be assigned IPv4 addresses. IPV6_ONLY (79632100): - New VMs in this subnet will only be assigned + New VMs in this subnet will only be assigned IPv6 addresses. UNSPECIFIED_STACK_TYPE (298084569): No description available. @@ -127812,11 +143150,12 @@ class StackType(proto.Enum): class State(proto.Enum): r"""[Output Only] The state of the subnetwork, which can be one of the - following values: READY: Subnetwork is created and ready to use - DRAINING: only applicable to subnetworks that have the purpose set - to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to - the load balancer are being drained. A subnetwork that is draining - cannot be used or modified until it reaches a status of READY + following values:READY: Subnetwork is created and ready to + useDRAINING: only applicable to subnetworks that have the purpose + set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections + to the load balancer are being drained. A subnetwork that is + draining cannot be used or modified until it reaches a status + ofREADY Values: UNDEFINED_STATE (0): @@ -128015,15 +143354,15 @@ class SubnetworkAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SubnetworksScopedList]): A list of SubnetworksScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#subnetworkAggregatedList for aggregated lists of - subnetworks. + [Output Only] Type of resource. + Alwayscompute#subnetworkAggregatedList for aggregated lists + of subnetworks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -128104,7 +143443,7 @@ class SubnetworkList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -128204,7 +143543,7 @@ class SubnetworkLogConfig(proto.Message): Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow - logs. Default is EXCLUDE_ALL_METADATA. Check the Metadata + logs. Default isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values. This field is a member of `oneof`_ ``_metadata``. @@ -128248,8 +143587,8 @@ class AggregationInterval(proto.Enum): class Metadata(proto.Enum): r"""Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields - should be added to the reported VPC flow logs. Default is - EXCLUDE_ALL_METADATA. + should be added to the reported VPC flow logs. Default + isEXCLUDE_ALL_METADATA. Values: UNDEFINED_METADATA (0): @@ -128308,11 +143647,15 @@ class SubnetworkParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -128335,14 +143678,15 @@ class SubnetworkSecondaryRange(proto.Message): must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. The range can - be any range listed in the Valid ranges list. + be any range listed in theValid + ranges list. This field is a member of `oneof`_ ``_ip_cidr_range``. range_name (str): The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 - characters long, and comply with RFC1035. The + characters long, and comply withRFC1035. The name must be unique within the subnetwork. This field is a member of `oneof`_ ``_range_name``. @@ -128594,9 +143938,9 @@ class SubnetworksSetPrivateIpGoogleAccessRequest(proto.Message): class Subsetting(proto.Message): - r"""Subsetting configuration for this BackendService. Currently - this is applicable only for Internal TCP/UDP load balancing, - Internal HTTP(S) load balancing and Traffic Director. + r"""Subsetting configuration for this BackendService. + Currently this is applicable only for Internal TCP/UDP load + balancing, Internal HTTP(S) load balancing and Traffic Director. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -128609,18 +143953,23 @@ class Subsetting(proto.Message): This field is a member of `oneof`_ ``_policy``. subset_size (int): The number of backends per backend group assigned to each - proxy instance or each service mesh client. An input - parameter to the ``CONSISTENT_HASH_SUBSETTING`` algorithm. - Can only be set if ``policy`` is set to + proxy instance or each service mesh client. + + An input parameter to the ``CONSISTENT_HASH_SUBSETTING`` + algorithm. Can only be set if ``policy`` is set to ``CONSISTENT_HASH_SUBSETTING``. Can only be set if load balancing scheme is ``INTERNAL_MANAGED`` or - ``INTERNAL_SELF_MANAGED``. ``subset_size`` is optional for - Internal HTTP(S) load balancing and required for Traffic - Director. If you do not provide this value, Cloud Load - Balancing will calculate it dynamically to optimize the - number of proxies/clients visible to each backend and vice - versa. Must be greater than 0. If ``subset_size`` is larger - than the number of backends/endpoints, then subsetting is + ``INTERNAL_SELF_MANAGED``. + + ``subset_size`` is optional for Internal HTTP(S) load + balancing and required for Traffic Director. + + If you do not provide this value, Cloud Load Balancing will + calculate it dynamically to optimize the number of + proxies/clients visible to each backend and vice versa. + + Must be greater than 0. If ``subset_size`` is larger than + the number of backends/endpoints, then subsetting is disabled. This field is a member of `oneof`_ ``_subset_size``. @@ -128634,23 +143983,31 @@ class Policy(proto.Enum): A value indicating that the enum field is not set. CONSISTENT_HASH_SUBSETTING (108989492): - Subsetting based on consistent hashing. For Traffic - Director, the number of backends per backend group (the - subset size) is based on the ``subset_size`` parameter. For - Internal HTTP(S) load balancing, the number of backends per - backend group (the subset size) is dynamically adjusted in - two cases: - As the number of proxy instances participating - in Internal HTTP(S) load balancing increases, the subset - size decreases. - When the total number of backends in a - network exceeds the capacity of a single proxy instance, - subset sizes are reduced automatically for each service that - has backend subsetting enabled. + Subsetting based on consistent hashing. + + For Traffic Director, the number of backends per backend + group (the subset size) is based on the ``subset_size`` + parameter. + + For Internal HTTP(S) load balancing, the number of backends + per backend group (the subset size) is dynamically adjusted + in two cases: + + - As the number of proxy instances participating in Internal + HTTP(S) load balancing increases, the subset size + decreases. + - When the total number of backends in a network exceeds the + capacity of a single proxy instance, subset sizes are + reduced automatically for each service that has backend + subsetting enabled. NONE (2402104): - No Subsetting. Clients may open connections - and send traffic to all backends of this backend - service. This can lead to performance issues if - there is substantial imbalance in the count of - clients and backends. + No Subsetting. + + Clients may open connections and send traffic to + all backends of this backend service. This can + lead to performance issues if there is + substantial imbalance in the count of clients + and backends. """ UNDEFINED_POLICY = 0 CONSISTENT_HASH_SUBSETTING = 108989492 @@ -128693,17 +144050,21 @@ class SuspendInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -128753,21 +144114,25 @@ class SuspendInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -128817,17 +144182,21 @@ class SuspendInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -128873,17 +144242,21 @@ class SwitchToCustomModeNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -128912,7 +144285,7 @@ class TCPHealthCheck(proto.Message): port (int): The TCP port number to which the health check prober sends packets. The default value is 80. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -128922,7 +144295,7 @@ class TCPHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -128935,14 +144308,16 @@ class TCPHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -128966,6 +144341,7 @@ class TCPHealthCheck(proto.Message): the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp This field is a member of `oneof`_ ``_response``. @@ -128974,7 +144350,7 @@ class TCPHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -128986,13 +144362,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -129081,8 +144458,10 @@ class Tags(proto.Message): Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update - or change tags. To see the latest fingerprint, - make get() request to the instance. + or change tags. + + To see the latest fingerprint, make get() + request to the instance. This field is a member of `oneof`_ ``_fingerprint``. items (MutableSequence[str]): @@ -129102,19 +144481,20 @@ class Tags(proto.Message): class TargetGrpcProxy(proto.Message): - r"""Represents a Target gRPC Proxy resource. A target gRPC proxy is a - component of load balancers intended for load balancing gRPC - traffic. Only global forwarding rules with load balancing scheme - INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The target - gRPC Proxy references a URL map that specifies how traffic is routed - to gRPC backend services. + r"""Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers intended for + load balancing gRPC traffic. Only global forwarding rules with load + balancing scheme INTERNAL_SELF_MANAGED can reference a target gRPC + proxy. The target gRPC Proxy references a URL map that specifies how + traffic is routed to gRPC backend services. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129142,14 +144522,14 @@ class TargetGrpcProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetGrpcProxy for target grpc proxies. + [Output Only] Type of the resource. + Alwayscompute#targetGrpcProxy for target grpc proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129180,12 +144560,13 @@ class TargetGrpcProxy(proto.Message): its referenced BackendServices to not allow unsupported features. A gRPC application must use "xds:///" scheme in the target URI of the - service it is connecting to. If false, indicates - that the BackendServices referenced by the - urlMap will be accessed by gRPC applications via - a sidecar proxy. In this case, a gRPC - application must not use "xds:///" scheme in the - target URI of the service it is connecting to + service it is connecting to. + If false, indicates that the BackendServices + referenced by the urlMap will be accessed by + gRPC applications via a sidecar proxy. In this + case, a gRPC application must not use "xds:///" + scheme in the target URI of the service it is + connecting to This field is a member of `oneof`_ ``_validate_for_proxyless``. """ @@ -129256,14 +144637,14 @@ class TargetGrpcProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetGrpcProxy]): A list of TargetGrpcProxy resources. kind (str): - [Output Only] Type of the resource. Always - compute#targetGrpcProxy for target grpc proxies. + [Output Only] Type of the resource. + Alwayscompute#targetGrpcProxy for target grpc proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -129346,26 +144727,32 @@ class TargetHttpProxiesScopedList(proto.Message): class TargetHttpProxy(proto.Message): - r"""Represents a Target HTTP Proxy resource. Google Compute Engine has - two Target HTTP Proxy resources: \* - `Global `__ \* - `Regional `__ + r"""Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP load - balancers. \* targetHttpProxies are used by global external - Application Load Balancers, classic Application Load Balancers, - cross-region internal Application Load Balancers, and Traffic - Director. \* regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external Application Load - Balancers. Forwarding rules reference a target HTTP proxy, and the - target proxy then references a URL map. For more information, read - Using Target Proxies and Forwarding rule concepts. + balancers. + + - targetHttpProxies are used by global external Application Load + Balancers, classic Application Load Balancers, cross-region + internal Application Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal Application + Load Balancers and regional external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the target proxy + then references a URL map. For more information, readUsing Target + Proxies and Forwarding rule concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129389,29 +144776,34 @@ class TargetHttpProxy(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. http_filters (MutableSequence[str]): URLs to networkservices.HttpFilter resources enabled for xDS - clients using this configuration. For example, - https://networkservices.googleapis.com/v1alpha1/projects/project/locations/ - locationhttpFilters/httpFilter Only filters that handle - outbound connection and stream events may be specified. - These filters work in conjunction with a default set of HTTP - filters that may already be configured by Traffic Director. - Traffic Director will determine the final location of these - filters within xDS configuration based on the name of the - HTTP filter. If Traffic Director positions multiple filters - at the same location, those filters will be in the same - order as specified in this list. httpFilters only applies - for loadbalancers with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + clients using this configuration. For + example,https://networkservices.googleapis.com/v1alpha1/projects/project/locations/locationhttpFilters/httpFilter + Only filters that handle outbound connection and stream + events may be specified. These filters work in conjunction + with a default set of HTTP filters that may already be + configured by Traffic Director. Traffic Director will + determine the final location of these filters within xDS + configuration based on the name of the HTTP filter. If + Traffic Director positions multiple filters at the same + location, those filters will be in the same order as + specified in this list. + + httpFilters only applies for loadbalancers + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. See + ForwardingRule for more details. http_keep_alive_timeout_sec (int): Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value - (610 seconds) will be used. For global external - Application Load Balancers, the minimum allowed - value is 5 seconds and the maximum allowed value - is 1200 seconds. For classic Application Load - Balancers, this option is not supported. + (610 seconds) will be used. + + For global external Application Load Balancers, + the minimum allowed value is 5 seconds and the + maximum allowed value is 1200 seconds. + + For classic Application Load Balancers, this + option is not supported. This field is a member of `oneof`_ ``_http_keep_alive_timeout_sec``. id (int): @@ -129427,7 +144819,7 @@ class TargetHttpProxy(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129438,13 +144830,16 @@ class TargetHttpProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. @@ -129541,15 +144936,15 @@ class TargetHttpProxyAggregatedList(proto.Message): A list of TargetHttpProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpProxyAggregatedList for lists of Target - HTTP Proxies. + [Output Only] Type of resource. + Alwayscompute#targetHttpProxyAggregatedList for lists of + Target HTTP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -129631,7 +145026,7 @@ class TargetHttpProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -129721,9 +145116,9 @@ class TargetHttpsProxiesSetCertificateMapRequest(proto.Message): Attributes: certificate_map (str): URL of the Certificate Map to associate with - this TargetHttpsProxy. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + this TargetHttpsProxy. + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. """ @@ -129798,19 +145193,25 @@ class TargetHttpsProxiesSetSslCertificatesRequest(proto.Message): class TargetHttpsProxy(proto.Message): - r"""Represents a Target HTTPS Proxy resource. Google Compute Engine has - two Target HTTPS Proxy resources: \* - `Global `__ \* - `Regional `__ + r"""Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud HTTPS load - balancers. \* targetHttpsProxies are used by global external - Application Load Balancers, classic Application Load Balancers, - cross-region internal Application Load Balancers, and Traffic - Director. \* regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external Application Load - Balancers. Forwarding rules reference a target HTTPS proxy, and the - target proxy then references a URL map. For more information, read - Using Target Proxies and Forwarding rule concepts. + balancers. + + - targetHttpsProxies are used by global external Application Load + Balancers, classic Application Load Balancers, cross-region + internal Application Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal Application + Load Balancers and regional external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the target + proxy then references a URL map. For more information, readUsing + Target Proxies and Forwarding rule concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -129829,10 +145230,15 @@ class TargetHttpsProxy(proto.Message): networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization - policy. Refer to the AuthorizationPolicy resource for - additional details. authorizationPolicy only applies to a - global TargetHttpsProxy attached to globalForwardingRules - with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. + policy. + + Refer to the AuthorizationPolicy resource for additional + details. + + authorizationPolicy only applies to a globalTargetHttpsProxy + attached toglobalForwardingRules with theloadBalancingScheme + set to INTERNAL_SELF_MANAGED. + Note: This field currently has no impact. This field is a member of `oneof`_ ``_authorization_policy``. @@ -129842,15 +145248,16 @@ class TargetHttpsProxy(proto.Message): proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products - use Certificate Manager Certificates instead. If - set, sslCertificates will be ignored. Accepted - format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + use Certificate Manager Certificates instead. + + If set, sslCertificates will be ignored. + + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129874,29 +145281,34 @@ class TargetHttpsProxy(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. http_filters (MutableSequence[str]): URLs to networkservices.HttpFilter resources enabled for xDS - clients using this configuration. For example, - https://networkservices.googleapis.com/beta/projects/project/locations/ - location/httpFilters/httpFilter Only filters that handle - outbound connection and stream events may be specified. - These filters work in conjunction with a default set of HTTP - filters that may already be configured by Traffic Director. - Traffic Director will determine the final location of these - filters within xDS configuration based on the name of the - HTTP filter. If Traffic Director positions multiple filters - at the same location, those filters will be in the same - order as specified in this list. httpFilters only applies - for loadbalancers with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + clients using this configuration. For + example,https://networkservices.googleapis.com/beta/projects/project/locations/location/httpFilters/httpFilter + Only filters that handle outbound connection and stream + events may be specified. These filters work in conjunction + with a default set of HTTP filters that may already be + configured by Traffic Director. Traffic Director will + determine the final location of these filters within xDS + configuration based on the name of the HTTP filter. If + Traffic Director positions multiple filters at the same + location, those filters will be in the same order as + specified in this list. + + httpFilters only applies for loadbalancers + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. See + ForwardingRule for more details. http_keep_alive_timeout_sec (int): Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value - (610 seconds) will be used. For global external - Application Load Balancers, the minimum allowed - value is 5 seconds and the maximum allowed value - is 1200 seconds. For classic Application Load - Balancers, this option is not supported. + (610 seconds) will be used. + + For global external Application Load Balancers, + the minimum allowed value is 5 seconds and the + maximum allowed value is 1200 seconds. + + For classic Application Load Balancers, this + option is not supported. This field is a member of `oneof`_ ``_http_keep_alive_timeout_sec``. id (int): @@ -129905,14 +145317,14 @@ class TargetHttpsProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpsProxy for target HTTPS proxies. + [Output Only] Type of resource. + Alwayscompute#targetHttpsProxy for target HTTPS proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129923,13 +145335,16 @@ class TargetHttpsProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. @@ -129937,16 +145352,19 @@ class TargetHttpsProxy(proto.Message): Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to - negotiate QUIC with clients. You can specify - NONE, ENABLE, or DISABLE. - When quic-override - is set to NONE, Google manages whether QUIC is - used. - When quic-override is set to ENABLE, the - load balancer uses QUIC when possible. - When - quic-override is set to DISABLE, the load - balancer doesn't use QUIC. - If the - quic-override flag is not specified, NONE is - implied. Check the QuicOverride enum for the - list of possible values. + negotiate QUIC with clients. + You can specify NONE, ENABLE, orDISABLE. + + - When quic-override is set to NONE, + Google manages whether QUIC is used. + - When quic-override is set to ENABLE, the + load balancer uses QUIC when possible. + - When quic-override is set to DISABLE, the + load balancer doesn't use QUIC. + - If the quic-override flag is not + specified,NONE is implied. Check the + QuicOverride enum for the list of possible + values. This field is a member of `oneof`_ ``_quic_override``. region (str): @@ -129963,18 +145381,20 @@ class TargetHttpsProxy(proto.Message): Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. - serverTlsPolicy only applies to a global TargetHttpsProxy - attached to globalForwardingRules with the - loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL - or EXTERNAL_MANAGED or INTERNAL_MANAGED. It also applies to - a regional TargetHttpsProxy attached to regional - forwardingRules with the loadBalancingScheme set to - EXTERNAL_MANAGED or INTERNAL_MANAGED. For details which - ServerTlsPolicy resources are accepted with - INTERNAL_SELF_MANAGED and which with EXTERNAL, - INTERNAL_MANAGED, EXTERNAL_MANAGED loadBalancingScheme - consult ServerTlsPolicy documentation. If left blank, - communications are not encrypted. + + serverTlsPolicy only applies to a globalTargetHttpsProxy + attached toglobalForwardingRules with theloadBalancingScheme + set to INTERNAL_SELF_MANAGED or EXTERNAL orEXTERNAL_MANAGED + or INTERNAL_MANAGED. It also applies to a regional + TargetHttpsProxy attached to regional forwardingRules with + theloadBalancingScheme set to EXTERNAL_MANAGED + orINTERNAL_MANAGED. For details whichServerTlsPolicy + resources are accepted withINTERNAL_SELF_MANAGED and which + with EXTERNAL,INTERNAL_MANAGED, + EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy + documentation. + + If left blank, communications are not encrypted. This field is a member of `oneof`_ ``_server_tls_policy``. ssl_certificates (MutableSequence[str]): @@ -129982,22 +145402,26 @@ class TargetHttpsProxy(proto.Message): authenticate connections between users and the load balancer. At least one SSL certificate must be specified. SslCertificates do not apply when the load balancing scheme - is set to INTERNAL_SELF_MANAGED. The URLs should refer to a - SSL Certificate resource or Certificate Manager Certificate - resource. Mixing Classic Certificates and Certificate - Manager Certificates is not allowed. Certificate Manager - Certificates must include the certificatemanager API - namespace. Using Certificate Manager Certificates in this - field is not supported by Global external Application Load - Balancer or Classic Application Load Balancer, use - certificate_map instead. Currently, you may specify up to 15 - Classic SSL Certificates or up to 100 Certificate Manager - Certificates. Certificate Manager Certificates accepted - formats are: - - //certificatemanager.googleapis.com/projects/{project}/locations/{ - location}/certificates/{resourceName}. - - https://certificatemanager.googleapis.com/v1alpha1/projects/{project - }/locations/{location}/certificates/{resourceName}. + is set to INTERNAL_SELF_MANAGED. + + The URLs should refer to a SSL Certificate resource or + Certificate Manager Certificate resource. Mixing Classic + Certificates and Certificate Manager Certificates is not + allowed. Certificate Manager Certificates must include the + certificatemanager API namespace. Using Certificate Manager + Certificates in this field is not supported by Global + external Application Load Balancer or Classic Application + Load Balancer, use certificate_map instead. + + Currently, you may specify up to 15 Classic SSL Certificates + or up to 100 Certificate Manager Certificates. + + Certificate Manager Certificates accepted formats are: + + :: + + - //certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificates/{resourceName}. + - https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}. ssl_policy (str): URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. @@ -130013,14 +145437,18 @@ class TargetHttpsProxy(proto.Message): request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP (HTTP/2) as well as - over UDP (QUIC/h3). This can improve application - performance, especially on networks where - interruptions may be common, such as on mobile. + over UDP (QUIC/h3). + + This can improve application performance, + especially on networks where interruptions may + be common, such as on mobile. + Requests with Early Data will have the "Early-Data" HTTP header set on the request, with a value of "1", to allow the backend to - determine whether Early Data was included. Note: - TLS Early Data may allow requests to be + determine whether Early Data was included. + + Note: TLS Early Data may allow requests to be replayed, as the data is sent to the backend before the handshake has fully completed. Applications that allow idempotent HTTP methods @@ -130029,9 +145457,11 @@ class TargetHttpsProxy(proto.Message): Early Data on those requests, and reject requests with the "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) status code, in - order to remain RFC compliant. The default value - is DISABLED. Check the TlsEarlyData enum for the - list of possible values. + order to remain RFC compliant. + + The default value is DISABLED. + Check the TlsEarlyData enum for the list of + possible values. This field is a member of `oneof`_ ``_tls_early_data``. url_map (str): @@ -130039,11 +145469,12 @@ class TargetHttpsProxy(proto.Message): UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a - URL map: - - https://www.googleapis.compute/v1/projects/project/global/urlMaps/ - url-map - - projects/project/global/urlMaps/url-map - - global/urlMaps/url-map + URL map: + + - + https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map + - projects/project/global/urlMaps/url-map + - global/urlMaps/url-map This field is a member of `oneof`_ ``_url_map``. """ @@ -130051,13 +145482,16 @@ class TargetHttpsProxy(proto.Message): class QuicOverride(proto.Enum): r"""Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer - attempts to negotiate QUIC with clients. You can specify NONE, - ENABLE, or DISABLE. - When quic-override is set to NONE, Google - manages whether QUIC is used. - When quic-override is set to - ENABLE, the load balancer uses QUIC when possible. - When - quic-override is set to DISABLE, the load balancer doesn't use - QUIC. - If the quic-override flag is not specified, NONE is - implied. + attempts to negotiate QUIC with clients. + You can specify NONE, ENABLE, orDISABLE. + + - When quic-override is set to NONE, + Google manages whether QUIC is used. + - When quic-override is set to ENABLE, the + load balancer uses QUIC when possible. + - When quic-override is set to DISABLE, the + load balancer doesn't use QUIC. + - If the quic-override flag is not specified,NONE is implied. Values: UNDEFINED_QUIC_OVERRIDE (0): @@ -130085,20 +145519,25 @@ class TlsEarlyData(proto.Enum): handshake to include the initial application payload (a HTTP request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP - (HTTP/2) as well as over UDP (QUIC/h3). This can improve - application performance, especially on networks where - interruptions may be common, such as on mobile. Requests with - Early Data will have the "Early-Data" HTTP header set on the - request, with a value of "1", to allow the backend to determine - whether Early Data was included. Note: TLS Early Data may allow - requests to be replayed, as the data is sent to the backend - before the handshake has fully completed. Applications that - allow idempotent HTTP methods to make non-idempotent changes, - such as a GET request updating a database, should not accept - Early Data on those requests, and reject requests with the - "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) - status code, in order to remain RFC compliant. The default value - is DISABLED. + (HTTP/2) as well as over UDP (QUIC/h3). + + This can improve application performance, especially on networks + where interruptions may be common, such as on mobile. + + Requests with Early Data will have the "Early-Data" HTTP header + set on the request, with a value of "1", to allow the backend to + determine whether Early Data was included. + + Note: TLS Early Data may allow requests to be replayed, as the + data is sent to the backend before the handshake has fully + completed. Applications that allow idempotent HTTP methods to + make non-idempotent changes, such as a GET request updating a + database, should not accept Early Data on those requests, and + reject requests with the "Early-Data: 1" HTTP header by + returning a HTTP 425 (Too Early) status code, in order to remain + RFC compliant. + + The default value is DISABLED. Values: UNDEFINED_TLS_EARLY_DATA (0): @@ -130259,15 +145698,15 @@ class TargetHttpsProxyAggregatedList(proto.Message): A list of TargetHttpsProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpsProxyAggregatedList for lists of Target - HTTP Proxies. + [Output Only] Type of resource. + Alwayscompute#targetHttpsProxyAggregatedList for lists of + Target HTTP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -130349,7 +145788,7 @@ class TargetHttpsProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -130403,18 +145842,21 @@ def raw_page(self): class TargetInstance(proto.Message): - r"""Represents a Target Instance resource. You can use a target - instance to handle traffic for one or more forwarding rules, - which is ideal for forwarding protocol traffic that is managed - by a single source. For example, ESP, AH, TCP, or UDP. For more - information, read Target instances. + r"""Represents a Target Instance resource. + + You can use a target instance to handle traffic for one or more + forwarding rules, which is ideal for forwarding protocol traffic + that is managed by a single source. For example, ESP, AH, TCP, + or UDP. + For more information, readTarget + instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -130434,22 +145876,24 @@ class TargetInstance(proto.Message): creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the - following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance - - zones/zone/instances/instance + following are all valid URLs: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance + - zones/zone/instances/instance This field is a member of `oneof`_ ``_instance``. kind (str): - [Output Only] The type of the resource. Always - compute#targetInstance for target instances. + [Output Only] The type of the resource. + Alwayscompute#targetInstance for target instances. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -130581,7 +146025,7 @@ class TargetInstanceAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -130661,7 +146105,7 @@ class TargetInstanceList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -130744,11 +146188,13 @@ class TargetInstancesScopedList(proto.Message): class TargetPool(proto.Message): - r"""Represents a Target Pool resource. Target pools are used with - external passthrough Network Load Balancers. A target pool - references member instances, an associated legacy - HttpHealthCheck resource, and, optionally, a backup target pool. - For more information, read Using target pools. + r"""Represents a Target Pool resource. + + Target pools are used with external passthrough Network Load + Balancers. A target pool references member instances, an + associated legacy HttpHealthCheck resource, and, optionally, a + backup target pool. For more information, readUsing target + pools. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -130758,21 +146204,23 @@ class TargetPool(proto.Message): The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio - field is properly set to a value between [0, 1]. backupPool + field is properly set to a value between [0, 1].backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy - instances in the primary pool is at or below failoverRatio, + instances in the primary pool is at or belowfailoverRatio, traffic arriving at the load-balanced IP will be directed to - the backup pool. In case where failoverRatio and backupPool - are not set, or all the instances in the backup pool are - unhealthy, the traffic will be directed back to the primary - pool in the "force" mode, where traffic will be spread to - the healthy instances with the best effort, or to all - instances when no instance is healthy. + the backup pool. + + In case where failoverRatio and backupPool are not set, or + all the instances in the backup pool are unhealthy, the + traffic will be directed back to the primary pool in the + "force" mode, where traffic will be spread to the healthy + instances with the best effort, or to all instances when no + instance is healthy. This field is a member of `oneof`_ ``_backup_pool``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -130785,17 +146233,20 @@ class TargetPool(proto.Message): This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value - of the field must be in [0, 1]. If set, backupPool must also - be set. They together define the fallback behavior of the - primary target pool: if the ratio of the healthy instances - in the primary pool is at or below this number, traffic - arriving at the load-balanced IP will be directed to the - backup pool. In case where failoverRatio is not set or all - the instances in the backup pool are unhealthy, the traffic - will be directed back to the primary pool in the "force" - mode, where traffic will be spread to the healthy instances - with the best effort, or to all instances when no instance - is healthy. + of the field must be in [0, 1]. + + If set, backupPool must also be set. They together define + the fallback behavior of the primary target pool: if the + ratio of the healthy instances in the primary pool is at or + below this number, traffic arriving at the load-balanced IP + will be directed to the backup pool. + + In case where failoverRatio is not set or all the instances + in the backup pool are unhealthy, the traffic will be + directed back to the primary pool in the "force" mode, where + traffic will be spread to the healthy instances with the + best effort, or to all instances when no instance is + healthy. This field is a member of `oneof`_ ``_failover_ratio``. health_checks (MutableSequence[str]): @@ -130822,7 +146273,7 @@ class TargetPool(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -131011,15 +146462,15 @@ class TargetPoolAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.TargetPoolsScopedList]): A list of TargetPool resources. kind (str): - [Output Only] Type of resource. Always - compute#targetPoolAggregatedList for aggregated lists of - target pools. + [Output Only] Type of resource. + Alwayscompute#targetPoolAggregatedList for aggregated lists + of target pools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -131088,9 +146539,9 @@ class TargetPoolInstanceHealth(proto.Message): health_status (MutableSequence[google.cloud.compute_v1beta.types.HealthStatus]): kind (str): - [Output Only] Type of resource. Always - compute#targetPoolInstanceHealth when checking the health of - an instance. + [Output Only] Type of resource. + Alwayscompute#targetPoolInstanceHealth when checking the + health of an instance. This field is a member of `oneof`_ ``_kind``. """ @@ -131128,7 +146579,7 @@ class TargetPoolList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -131205,11 +146656,13 @@ class TargetPoolsAddInstanceRequest(proto.Message): A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are - valid URLs: - - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone - /instances/instance-name - - projects/project-id/zones/zone/instances/instance-name - - zones/zone/instances/instance-name + valid URLs: + + - + https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name + - + projects/project-id/zones/zone/instances/instance-name + - zones/zone/instances/instance-name """ instances: MutableSequence["InstanceReference"] = proto.RepeatedField( @@ -131226,11 +146679,13 @@ class TargetPoolsRemoveHealthCheckRequest(proto.Message): health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheckReference]): Health check URL to be removed. This can be a full or valid partial URL. For example, the - following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project - /global/httpHealthChecks/health-check - - projects/project/global/httpHealthChecks/health-check - - global/httpHealthChecks/health-check + following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check + - + projects/project/global/httpHealthChecks/health-check + - global/httpHealthChecks/health-check """ health_checks: MutableSequence["HealthCheckReference"] = proto.RepeatedField( @@ -131331,9 +146786,9 @@ class TargetSslProxiesSetCertificateMapRequest(proto.Message): Attributes: certificate_map (str): URL of the Certificate Map to associate with - this TargetSslProxy. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + this TargetSslProxy. + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. """ @@ -131402,11 +146857,12 @@ class TargetSslProxiesSetSslCertificatesRequest(proto.Message): class TargetSslProxy(proto.Message): - r"""Represents a Target SSL Proxy resource. A target SSL proxy is - a component of a Proxy Network Load Balancer. The forwarding - rule references the target SSL proxy, and the target proxy then - references a backend service. For more information, read Proxy - Network Load Balancer overview. + r"""Represents a Target SSL Proxy resource. + + A target SSL proxy is a component of a Proxy Network Load + Balancer. The forwarding rule references the target SSL proxy, + and the target proxy then references a backend service. For more + information, readProxy Network Load Balancer overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -131417,13 +146873,14 @@ class TargetSslProxy(proto.Message): certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be - ignored. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + ignored. + + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -131438,14 +146895,14 @@ class TargetSslProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetSslProxy for target SSL proxies. + [Output Only] Type of the resource. + Alwayscompute#targetSslProxy for target SSL proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -131576,7 +147033,7 @@ class TargetSslProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -131717,18 +147174,19 @@ class ProxyHeader(proto.Enum): class TargetTcpProxy(proto.Message): - r"""Represents a Target TCP Proxy resource. A target TCP proxy is - a component of a Proxy Network Load Balancer. The forwarding - rule references the target TCP proxy, and the target proxy then - references a backend service. For more information, read Proxy - Network Load Balancer overview. + r"""Represents a Target TCP Proxy resource. + + A target TCP proxy is a component of a Proxy Network Load + Balancer. The forwarding rule references the target TCP proxy, + and the target proxy then references a backend service. For more + information, readProxy Network Load Balancer overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -131743,14 +147201,14 @@ class TargetTcpProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetTcpProxy for target TCP proxies. + [Output Only] Type of the resource. + Alwayscompute#targetTcpProxy for target TCP proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -131761,13 +147219,16 @@ class TargetTcpProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. @@ -131877,15 +147338,15 @@ class TargetTcpProxyAggregatedList(proto.Message): A list of TargetTcpProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetTcpProxyAggregatedList for lists of Target TCP - Proxies. + [Output Only] Type of resource. + Alwayscompute#targetTcpProxyAggregatedList for lists of + Target TCP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -131965,7 +147426,7 @@ class TargetTcpProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -132019,16 +147480,18 @@ def raw_page(self): class TargetVpnGateway(proto.Message): - r"""Represents a Target VPN Gateway resource. The target VPN - gateway resource represents a Classic Cloud VPN gateway. For - more information, read the the Cloud VPN Overview. + r"""Represents a Target VPN Gateway resource. + + The target VPN gateway resource represents a Classic Cloud VPN + gateway. For more information, read thethe + Cloud VPN Overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -132039,17 +147502,17 @@ class TargetVpnGateway(proto.Message): This field is a member of `oneof`_ ``_description``. forwarding_rules (MutableSequence[str]): [Output Only] A list of URLs to the ForwardingRule - resources. ForwardingRules are created using - compute.forwardingRules.insert and associated with a VPN - gateway. + resources. ForwardingRules are created + usingcompute.forwardingRules.insert and associated with a + VPN gateway. id (int): [Output Only] The unique identifier for the resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -132061,21 +147524,21 @@ class TargetVpnGateway(proto.Message): request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - TargetVpnGateway. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a TargetVpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -132214,14 +147677,14 @@ class TargetVpnGatewayAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.TargetVpnGatewaysScopedList]): A list of TargetVpnGateway resources. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -132295,14 +147758,14 @@ class TargetVpnGatewayList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetVpnGateway]): A list of TargetVpnGateway resources. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -132865,10 +148328,266 @@ class TestIamPermissionsImageRequest(proto.Message): ) -class TestIamPermissionsInstanceGroupManagerRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.TestIamPermissions. See the method - description for details. +class TestIamPermissionsInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.TestIamPermissions. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class TestIamPermissionsInstanceGroupRequest(proto.Message): + r"""A request message for InstanceGroups.TestIamPermissions. See + the method description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class TestIamPermissionsInstanceRequest(proto.Message): + r"""A request message for Instances.TestIamPermissions. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class TestIamPermissionsInstanceTemplateRequest(proto.Message): + r"""A request message for InstanceTemplates.TestIamPermissions. + See the method description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsInstantSnapshotRequest(proto.Message): + r"""A request message for InstantSnapshots.TestIamPermissions. + See the method description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class TestIamPermissionsInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for + InterconnectAttachmentGroups.TestIamPermissions. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsInterconnectAttachmentRequest(proto.Message): + r"""A request message for + InterconnectAttachments.TestIamPermissions. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.TestIamPermissions. + See the method description for details. + + Attributes: + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsInterconnectRequest(proto.Message): + r"""A request message for Interconnects.TestIamPermissions. See + the method description for details. Attributes: project (str): @@ -132877,8 +148596,6 @@ class TestIamPermissionsInstanceGroupManagerRequest(proto.Message): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( @@ -132894,14 +148611,10 @@ class TestIamPermissionsInstanceGroupManagerRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsInstanceGroupRequest(proto.Message): - r"""A request message for InstanceGroups.TestIamPermissions. See +class TestIamPermissionsLicenseCodeRequest(proto.Message): + r"""A request message for LicenseCodes.TestIamPermissions. See the method description for details. Attributes: @@ -132911,8 +148624,6 @@ class TestIamPermissionsInstanceGroupRequest(proto.Message): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( @@ -132928,14 +148639,10 @@ class TestIamPermissionsInstanceGroupRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsInstanceRequest(proto.Message): - r"""A request message for Instances.TestIamPermissions. See the +class TestIamPermissionsLicenseRequest(proto.Message): + r"""A request message for Licenses.TestIamPermissions. See the method description for details. Attributes: @@ -132945,8 +148652,6 @@ class TestIamPermissionsInstanceRequest(proto.Message): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( @@ -132962,15 +148667,11 @@ class TestIamPermissionsInstanceRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsInstanceTemplateRequest(proto.Message): - r"""A request message for InstanceTemplates.TestIamPermissions. - See the method description for details. +class TestIamPermissionsMachineImageRequest(proto.Message): + r"""A request message for MachineImages.TestIamPermissions. See + the method description for details. Attributes: project (str): @@ -132996,25 +148697,29 @@ class TestIamPermissionsInstanceTemplateRequest(proto.Message): ) -class TestIamPermissionsInstantSnapshotRequest(proto.Message): - r"""A request message for InstantSnapshots.TestIamPermissions. +class TestIamPermissionsNetworkAttachmentRequest(proto.Message): + r"""A request message for NetworkAttachments.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133024,15 +148729,11 @@ class TestIamPermissionsInstantSnapshotRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsInterconnectAttachmentGroupRequest(proto.Message): +class TestIamPermissionsNetworkEndpointGroupRequest(proto.Message): r"""A request message for - InterconnectAttachmentGroups.TestIamPermissions. See the method + NetworkEndpointGroups.TestIamPermissions. See the method description for details. Attributes: @@ -133042,6 +148743,8 @@ class TestIamPermissionsInterconnectAttachmentGroupRequest(proto.Message): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request + zone (str): + The name of the zone for this request. """ project: str = proto.Field( @@ -133057,18 +148760,20 @@ class TestIamPermissionsInterconnectAttachmentGroupRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class TestIamPermissionsInterconnectAttachmentRequest(proto.Message): +class TestIamPermissionsNetworkFirewallPolicyRequest(proto.Message): r"""A request message for - InterconnectAttachments.TestIamPermissions. See the method + NetworkFirewallPolicies.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. - region (str): - The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): @@ -133079,10 +148784,6 @@ class TestIamPermissionsInterconnectAttachmentRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133094,9 +148795,9 @@ class TestIamPermissionsInterconnectAttachmentRequest(proto.Message): ) -class TestIamPermissionsInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.TestIamPermissions. - See the method description for details. +class TestIamPermissionsNetworkRequest(proto.Message): + r"""A request message for Networks.TestIamPermissions. See the + method description for details. Attributes: project (str): @@ -133122,9 +148823,9 @@ class TestIamPermissionsInterconnectGroupRequest(proto.Message): ) -class TestIamPermissionsInterconnectRequest(proto.Message): - r"""A request message for Interconnects.TestIamPermissions. See - the method description for details. +class TestIamPermissionsNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.TestIamPermissions. See the + method description for details. Attributes: project (str): @@ -133133,6 +148834,8 @@ class TestIamPermissionsInterconnectRequest(proto.Message): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request + zone (str): + The name of the zone for this request. """ project: str = proto.Field( @@ -133148,15 +148851,21 @@ class TestIamPermissionsInterconnectRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class TestIamPermissionsLicenseCodeRequest(proto.Message): - r"""A request message for LicenseCodes.TestIamPermissions. See +class TestIamPermissionsNodeTemplateRequest(proto.Message): + r"""A request message for NodeTemplates.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): @@ -133167,33 +148876,9 @@ class TestIamPermissionsLicenseCodeRequest(proto.Message): proto.STRING, number=227560217, ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) - test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( - proto.MESSAGE, - number=439214758, - message="TestPermissionsRequest", - ) - - -class TestIamPermissionsLicenseRequest(proto.Message): - r"""A request message for Licenses.TestIamPermissions. See the - method description for details. - - Attributes: - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): - The body resource for this request - """ - - project: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=227560217, + number=138946292, ) resource: str = proto.Field( proto.STRING, @@ -133206,13 +148891,15 @@ class TestIamPermissionsLicenseRequest(proto.Message): ) -class TestIamPermissionsMachineImageRequest(proto.Message): - r"""A request message for MachineImages.TestIamPermissions. See - the method description for details. +class TestIamPermissionsPacketMirroringRequest(proto.Message): + r"""A request message for PacketMirrorings.TestIamPermissions. + See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): @@ -133223,6 +148910,10 @@ class TestIamPermissionsMachineImageRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133234,8 +148925,8 @@ class TestIamPermissionsMachineImageRequest(proto.Message): ) -class TestIamPermissionsNetworkAttachmentRequest(proto.Message): - r"""A request message for NetworkAttachments.TestIamPermissions. +class TestIamPermissionsRegionAutoscalerRequest(proto.Message): + r"""A request message for RegionAutoscalers.TestIamPermissions. See the method description for details. Attributes: @@ -133268,26 +148959,30 @@ class TestIamPermissionsNetworkAttachmentRequest(proto.Message): ) -class TestIamPermissionsNetworkEndpointGroupRequest(proto.Message): +class TestIamPermissionsRegionBackendBucketRequest(proto.Message): r"""A request message for - NetworkEndpointGroups.TestIamPermissions. See the method + RegionBackendBuckets.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133297,20 +148992,18 @@ class TestIamPermissionsNetworkEndpointGroupRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsNetworkFirewallPolicyRequest(proto.Message): +class TestIamPermissionsRegionBackendServiceRequest(proto.Message): r"""A request message for - NetworkFirewallPolicies.TestIamPermissions. See the method + RegionBackendServices.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): @@ -133321,6 +149014,10 @@ class TestIamPermissionsNetworkFirewallPolicyRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133332,13 +149029,15 @@ class TestIamPermissionsNetworkFirewallPolicyRequest(proto.Message): ) -class TestIamPermissionsNetworkRequest(proto.Message): - r"""A request message for Networks.TestIamPermissions. See the - method description for details. +class TestIamPermissionsRegionCommitmentRequest(proto.Message): + r"""A request message for RegionCommitments.TestIamPermissions. + See the method description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): @@ -133349,6 +149048,10 @@ class TestIamPermissionsNetworkRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133360,25 +149063,30 @@ class TestIamPermissionsNetworkRequest(proto.Message): ) -class TestIamPermissionsNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.TestIamPermissions. See the - method description for details. +class TestIamPermissionsRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for + RegionCompositeHealthChecks.TestIamPermissions. See the method + description for details. Attributes: project (str): Project ID for this request. + region (str): + The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request - zone (str): - The name of the zone for this request. """ project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -133388,15 +149096,11 @@ class TestIamPermissionsNodeGroupRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class TestIamPermissionsNodeTemplateRequest(proto.Message): - r"""A request message for NodeTemplates.TestIamPermissions. See - the method description for details. +class TestIamPermissionsRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.TestIamPermissions. See the + method description for details. Attributes: project (str): @@ -133428,9 +149132,10 @@ class TestIamPermissionsNodeTemplateRequest(proto.Message): ) -class TestIamPermissionsPacketMirroringRequest(proto.Message): - r"""A request message for PacketMirrorings.TestIamPermissions. - See the method description for details. +class TestIamPermissionsRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for + RegionHealthAggregationPolicies.TestIamPermissions. See the + method description for details. Attributes: project (str): @@ -133462,8 +149167,8 @@ class TestIamPermissionsPacketMirroringRequest(proto.Message): ) -class TestIamPermissionsRegionAutoscalerRequest(proto.Message): - r"""A request message for RegionAutoscalers.TestIamPermissions. +class TestIamPermissionsRegionHealthCheckRequest(proto.Message): + r"""A request message for RegionHealthChecks.TestIamPermissions. See the method description for details. Attributes: @@ -133496,9 +149201,9 @@ class TestIamPermissionsRegionAutoscalerRequest(proto.Message): ) -class TestIamPermissionsRegionBackendServiceRequest(proto.Message): +class TestIamPermissionsRegionHealthCheckServiceRequest(proto.Message): r"""A request message for - RegionBackendServices.TestIamPermissions. See the method + RegionHealthCheckServices.TestIamPermissions. See the method description for details. Attributes: @@ -133531,8 +149236,8 @@ class TestIamPermissionsRegionBackendServiceRequest(proto.Message): ) -class TestIamPermissionsRegionCommitmentRequest(proto.Message): - r"""A request message for RegionCommitments.TestIamPermissions. +class TestIamPermissionsRegionHealthSourceRequest(proto.Message): + r"""A request message for RegionHealthSources.TestIamPermissions. See the method description for details. Attributes: @@ -133565,9 +149270,10 @@ class TestIamPermissionsRegionCommitmentRequest(proto.Message): ) -class TestIamPermissionsRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.TestIamPermissions. See the - method description for details. +class TestIamPermissionsRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.TestIamPermissions. See the method + description for details. Attributes: project (str): @@ -133599,9 +149305,10 @@ class TestIamPermissionsRegionDiskRequest(proto.Message): ) -class TestIamPermissionsRegionHealthCheckRequest(proto.Message): - r"""A request message for RegionHealthChecks.TestIamPermissions. - See the method description for details. +class TestIamPermissionsRegionInstanceGroupRequest(proto.Message): + r"""A request message for + RegionInstanceGroups.TestIamPermissions. See the method + description for details. Attributes: project (str): @@ -133633,9 +149340,9 @@ class TestIamPermissionsRegionHealthCheckRequest(proto.Message): ) -class TestIamPermissionsRegionHealthCheckServiceRequest(proto.Message): +class TestIamPermissionsRegionInstantSnapshotRequest(proto.Message): r"""A request message for - RegionHealthCheckServices.TestIamPermissions. See the method + RegionInstantSnapshots.TestIamPermissions. See the method description for details. Attributes: @@ -133668,9 +149375,10 @@ class TestIamPermissionsRegionHealthCheckServiceRequest(proto.Message): ) -class TestIamPermissionsRegionHealthSourceRequest(proto.Message): - r"""A request message for RegionHealthSources.TestIamPermissions. - See the method description for details. +class TestIamPermissionsRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.TestIamPermissions. See the method + description for details. Attributes: project (str): @@ -133702,9 +149410,9 @@ class TestIamPermissionsRegionHealthSourceRequest(proto.Message): ) -class TestIamPermissionsRegionInstanceGroupManagerRequest(proto.Message): +class TestIamPermissionsRegionNotificationEndpointRequest(proto.Message): r"""A request message for - RegionInstanceGroupManagers.TestIamPermissions. See the method + RegionNotificationEndpoints.TestIamPermissions. See the method description for details. Attributes: @@ -133737,10 +149445,9 @@ class TestIamPermissionsRegionInstanceGroupManagerRequest(proto.Message): ) -class TestIamPermissionsRegionInstanceGroupRequest(proto.Message): - r"""A request message for - RegionInstanceGroups.TestIamPermissions. See the method - description for details. +class TestIamPermissionsRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.TestIamPermissions. See + the method description for details. Attributes: project (str): @@ -133772,9 +149479,9 @@ class TestIamPermissionsRegionInstanceGroupRequest(proto.Message): ) -class TestIamPermissionsRegionInstantSnapshotRequest(proto.Message): +class TestIamPermissionsRegionSslCertificateRequest(proto.Message): r"""A request message for - RegionInstantSnapshots.TestIamPermissions. See the method + RegionSslCertificates.TestIamPermissions. See the method description for details. Attributes: @@ -133807,10 +149514,9 @@ class TestIamPermissionsRegionInstantSnapshotRequest(proto.Message): ) -class TestIamPermissionsRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.TestIamPermissions. See the method - description for details. +class TestIamPermissionsRegionSslPolicyRequest(proto.Message): + r"""A request message for RegionSslPolicies.TestIamPermissions. + See the method description for details. Attributes: project (str): @@ -133842,9 +149548,9 @@ class TestIamPermissionsRegionNetworkFirewallPolicyRequest(proto.Message): ) -class TestIamPermissionsRegionNotificationEndpointRequest(proto.Message): +class TestIamPermissionsRegionTargetHttpProxyRequest(proto.Message): r"""A request message for - RegionNotificationEndpoints.TestIamPermissions. See the method + RegionTargetHttpProxies.TestIamPermissions. See the method description for details. Attributes: @@ -133877,9 +149583,10 @@ class TestIamPermissionsRegionNotificationEndpointRequest(proto.Message): ) -class TestIamPermissionsRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.TestIamPermissions. See - the method description for details. +class TestIamPermissionsRegionTargetHttpsProxyRequest(proto.Message): + r"""A request message for + RegionTargetHttpsProxies.TestIamPermissions. See the method + description for details. Attributes: project (str): @@ -133911,9 +149618,9 @@ class TestIamPermissionsRegionSnapshotRequest(proto.Message): ) -class TestIamPermissionsRegionSslCertificateRequest(proto.Message): +class TestIamPermissionsRegionTargetTcpProxyRequest(proto.Message): r"""A request message for - RegionSslCertificates.TestIamPermissions. See the method + RegionTargetTcpProxies.TestIamPermissions. See the method description for details. Attributes: @@ -133946,9 +149653,9 @@ class TestIamPermissionsRegionSslCertificateRequest(proto.Message): ) -class TestIamPermissionsRegionSslPolicyRequest(proto.Message): - r"""A request message for RegionSslPolicies.TestIamPermissions. - See the method description for details. +class TestIamPermissionsRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.TestIamPermissions. See + the method description for details. Attributes: project (str): @@ -133980,65 +149687,32 @@ class TestIamPermissionsRegionSslPolicyRequest(proto.Message): ) -class TestIamPermissionsRegionTargetHttpProxyRequest(proto.Message): - r"""A request message for - RegionTargetHttpProxies.TestIamPermissions. See the method - description for details. +class TestIamPermissionsReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.TestIamPermissions. + See the method description for details. Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. project (str): Project ID for this request. - region (str): - The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request + zone (str): + The name of the zone for this request. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( + parent_resource: str = proto.Field( proto.STRING, - number=195806222, - ) - test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( - proto.MESSAGE, - number=439214758, - message="TestPermissionsRequest", + number=18091011, ) - - -class TestIamPermissionsRegionTargetHttpsProxyRequest(proto.Message): - r"""A request message for - RegionTargetHttpsProxies.TestIamPermissions. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): - The body resource for this request - """ - project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -134048,66 +149722,31 @@ class TestIamPermissionsRegionTargetHttpsProxyRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) - - -class TestIamPermissionsRegionTargetTcpProxyRequest(proto.Message): - r"""A request message for - RegionTargetTcpProxies.TestIamPermissions. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): - The body resource for this request - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=195806222, - ) - test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( - proto.MESSAGE, - number=439214758, - message="TestPermissionsRequest", + number=3744684, ) -class TestIamPermissionsRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.TestIamPermissions. See +class TestIamPermissionsReservationRequest(proto.Message): + r"""A request message for Reservations.TestIamPermissions. See the method description for details. Attributes: project (str): Project ID for this request. - region (str): - The name of the region for this request. resource (str): Name or id of the resource for this request. test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): The body resource for this request + zone (str): + The name of the zone for this request. """ project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) resource: str = proto.Field( proto.STRING, number=195806222, @@ -134117,13 +149756,21 @@ class TestIamPermissionsRegionUrlMapRequest(proto.Message): number=439214758, message="TestPermissionsRequest", ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class TestIamPermissionsReservationRequest(proto.Message): - r"""A request message for Reservations.TestIamPermissions. See - the method description for details. +class TestIamPermissionsReservationSubBlockRequest(proto.Message): + r"""A request message for + ReservationSubBlocks.TestIamPermissions. See the method + description for details. Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. project (str): Project ID for this request. resource (str): @@ -134134,6 +149781,10 @@ class TestIamPermissionsReservationRequest(proto.Message): The name of the zone for this request. """ + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -134942,6 +150593,8 @@ class MaintenanceReasons(proto.Enum): Maintenance due to NVLink failure. FAILURE_REDUNDANT_HARDWARE_FAULT (31000530): Maintenance due to redundant hardware fault. + FAILURE_TPU (467889412): + Maintenance due to TPU errors. INFRASTRUCTURE_RELOCATION (359845636): Maintenance due to infrastructure relocation. MAINTENANCE_REASON_UNKNOWN (50570235): @@ -134966,6 +150619,7 @@ class MaintenanceReasons(proto.Enum): FAILURE_NETWORK = 42811449 FAILURE_NVLINK = 484426295 FAILURE_REDUNDANT_HARDWARE_FAULT = 31000530 + FAILURE_TPU = 467889412 INFRASTRUCTURE_RELOCATION = 359845636 MAINTENANCE_REASON_UNKNOWN = 50570235 PLANNED_NETWORK_UPDATE = 135494677 @@ -135079,17 +150733,21 @@ class UpdateAccessConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135145,17 +150803,21 @@ class UpdateAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135206,17 +150868,21 @@ class UpdateBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135261,17 +150927,21 @@ class UpdateBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135318,17 +150988,21 @@ class UpdateDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135393,17 +151067,21 @@ class UpdateDisplayDeviceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135453,17 +151131,21 @@ class UpdateFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135508,17 +151190,21 @@ class UpdateFutureReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135579,17 +151265,21 @@ class UpdateHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135633,22 +151323,27 @@ class UpdateInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the managed instance group. + The name of the zone + where you want to create the managed instance + group. """ instance_group_manager: str = proto.Field( @@ -135692,9 +151387,9 @@ class UpdateInstanceRequest(proto.Message): instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the - updated properties require. Check the - MinimalAction enum for the list of possible - values. + updated properties require. + Check the MinimalAction enum for the list of + possible values. This field is a member of `oneof`_ ``_minimal_action``. most_disruptive_allowed_action (str): @@ -135714,17 +151409,21 @@ class UpdateInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135815,17 +151514,21 @@ class UpdateLicenseRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135881,17 +151584,21 @@ class UpdateNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135946,17 +151653,21 @@ class UpdatePeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135993,8 +151704,8 @@ class UpdatePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_update_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersUpdatePerInstanceConfigsReq): The body resource for this request project (str): @@ -136004,23 +151715,27 @@ class UpdatePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -136057,8 +151772,8 @@ class UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. region (str): @@ -136071,17 +151786,21 @@ class UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136129,17 +151848,21 @@ class UpdatePreviewFeatureRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136187,17 +151910,21 @@ class UpdateRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136249,17 +151976,21 @@ class UpdateRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136313,17 +152044,21 @@ class UpdateRegionCommitmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -136391,17 +152126,21 @@ class UpdateRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -136466,17 +152205,21 @@ class UpdateRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136526,17 +152269,21 @@ class UpdateRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136630,17 +152377,21 @@ class UpdateReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): @@ -136712,17 +152463,21 @@ class UpdateReservationsRegionCommitmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136768,17 +152523,21 @@ class UpdateRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route_policy_resource (google.cloud.compute_v1beta.types.RoutePolicy): @@ -136829,17 +152588,21 @@ class UpdateRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -136890,17 +152653,21 @@ class UpdateShieldedInstanceConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_instance_config_resource (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): @@ -136950,17 +152717,21 @@ class UpdateShieldedVmConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_vm_config_resource (google.cloud.compute_v1beta.types.ShieldedVmConfig): @@ -137008,17 +152779,21 @@ class UpdateStoragePoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. storage_pool (str): @@ -137078,17 +152853,21 @@ class UpdateUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map (str): @@ -137117,65 +152896,153 @@ class UpdateUrlMapRequest(proto.Message): ) +class UpdateZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Update. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy (str): + Name of the zone VM extension policy to + update. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + vm_extension_policy: str = proto.Field( + proto.STRING, + number=331532730, + ) + vm_extension_policy_resource: "VmExtensionPolicy" = proto.Field( + proto.MESSAGE, + number=515669235, + message="VmExtensionPolicy", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class UrlMap(proto.Message): - r"""Represents a URL Map resource. Compute Engine has two URL Map - resources: \* `Global `__ - \* `Regional `__ A - URL map resource is a component of certain types of cloud load - balancers and Traffic Director: \* urlMaps are used by global - external Application Load Balancers, classic Application Load - Balancers, and cross-region internal Application Load Balancers. \* - regionUrlMaps are used by internal Application Load Balancers, - regional external Application Load Balancers and regional internal - Application Load Balancers. For a list of supported URL map features - by the load balancer type, see the Load balancing features: Routing - and traffic management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director features: - Routing and traffic management table. This resource defines mappings - from hostnames and URL paths to either a backend service or a - backend bucket. To use the global urlMaps resource, the backend - service must have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the regionUrlMaps - resource, the backend service must have a loadBalancingScheme of - INTERNAL_MANAGED. For more information, read URL Map Concepts. + r"""Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + + A URL map resource is a component of certain types of cloud load + balancers and Traffic Director: + + - urlMaps are used by global external Application Load Balancers, + classic Application Load Balancers, and cross-region internal + Application Load Balancers. + - regionUrlMaps are used by internal Application Load Balancers, + regional external Application Load Balancers and regional internal + Application Load Balancers. + + For a list of supported URL map features by the load balancer type, + see the Load balancing features: Routing and traffic management + table. + + For a list of supported URL map features for Traffic Director, see + the Traffic Director features: Routing and traffic management table. + + This resource defines mappings from hostnames and URL paths to + either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service must have a + loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or + INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the + backend service must have aloadBalancingScheme of INTERNAL_MANAGED. + For more information, read URL Map Concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. default_custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): defaultCustomErrorResponsePolicy specifies how the Load - Balancer returns error responses when BackendServiceor - BackendBucket responds with an error. This policy takes - effect at the load balancer level and applies only when no - policy has been defined for the error code at lower levels - like PathMatcher, RouteRule and PathRule within this UrlMap. + Balancer returns error responses when + BackendServiceorBackendBucket responds with an error. + + This policy takes effect at the load balancer level and + applies only when no policy has been defined for the error + code at lower levels like PathMatcher, RouteRule and + PathRule within this UrlMap. + For example, consider a UrlMap with the following - configuration: - defaultCustomErrorResponsePolicy containing - policies for responding to 5xx and 4xx errors - A - PathMatcher configured for \*.example.com has - defaultCustomErrorResponsePolicy for 4xx. If a request for - http://www.example.com/ encounters a 404, the policy in - pathMatcher.defaultCustomErrorResponsePolicy will be - enforced. When the request for http://www.example.com/ - encounters a 502, the policy in - UrlMap.defaultCustomErrorResponsePolicy will be enforced. + configuration: + + :: + + - defaultCustomErrorResponsePolicy containing policies for + responding to 5xx and 4xx errors + - A PathMatcher configured for *.example.com has + defaultCustomErrorResponsePolicy for 4xx. + + If a request for http://www.example.com/ encounters a404, + the policy inpathMatcher.defaultCustomErrorResponsePolicy + will be enforced. When the request for + http://www.example.com/ encounters a502, the policy + inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When a request that does not match any host in \*.example.com such as http://www.myotherexample.com/, - encounters a 404, UrlMap.defaultCustomErrorResponsePolicy - takes effect. When used in conjunction with - defaultRouteAction.retryPolicy, retries take precedence. - Only once all retries are exhausted, the - defaultCustomErrorResponsePolicy is applied. While - attempting a retry, if load balancer is successful in + encounters a404, UrlMap.defaultCustomErrorResponsePolicy + takes effect. + + When used in conjunction withdefaultRouteAction.retryPolicy, + retries take precedence. Only once all retries are + exhausted, thedefaultCustomErrorResponsePolicy is applied. + While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to - the client. defaultCustomErrorResponsePolicy is supported - only for global external Application Load Balancers. + the client. + + defaultCustomErrorResponsePolicy is supported only for + global external Application Load Balancers. This field is a member of `oneof`_ ``_default_custom_error_response_policy``. default_route_action (google.cloud.compute_v1beta.types.HttpRouteAction): @@ -137183,14 +153050,19 @@ class UrlMap(proto.Message): the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding - the request to the selected backend. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. URL maps for classic Application Load - Balancers only support the urlRewrite action - within defaultRouteAction. defaultRouteAction - has no effect when the URL map is bound to a - target gRPC proxy that has the + the request to the selected backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + + URL maps for classic Application Load Balancers + only support the urlRewrite action within + defaultRouteAction. + + defaultRouteAction has no effect when the URL + map is bound to a target gRPC proxy that has the validateForProxyless field set to true. This field is a member of `oneof`_ ``_default_route_action``. @@ -137200,22 +153072,28 @@ class UrlMap(proto.Message): the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the - request to the backend. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. defaultService has no effect when the URL - map is bound to a target gRPC proxy that has the + request to the backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + defaultService has no effect when the URL map is + bound to a target gRPC proxy that has the validateForProxyless field set to true. This field is a member of `oneof`_ ``_default_service``. default_url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): When none of the specified hostRules match, the request is redirected to a URL specified by - defaultUrlRedirect. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. Not supported when the URL map is bound to - a target gRPC proxy. + defaultUrlRedirect. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_default_url_redirect``. description (str): @@ -137231,22 +153109,27 @@ class UrlMap(proto.Message): ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with - error 412 conditionNotMet. To see the latest - fingerprint, make a get() request to retrieve a - UrlMap. + error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a UrlMap. This field is a member of `oneof`_ ``_fingerprint``. header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backendService. The headerAction - specified here take effect after headerAction - specified under pathMatcher. headerAction is not - supported for load balancers that have their - loadBalancingScheme set to EXTERNAL. Not - supported when the URL map is bound to a target - gRPC proxy that has validateForProxyless field - set to true. + selected backendService. + + The headerAction specified here take effect + afterheaderAction specified under pathMatcher. + + headerAction is not supported for load balancers + that have + their loadBalancingScheme set to EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. host_rules (MutableSequence[google.cloud.compute_v1beta.types.HostRule]): @@ -137265,7 +153148,7 @@ class UrlMap(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -137289,11 +153172,13 @@ class UrlMap(proto.Message): This field is a member of `oneof`_ ``_self_link``. tests (MutableSequence[google.cloud.compute_v1beta.types.UrlMapTest]): The list of expected URL mapping tests. - Request to update the UrlMap succeeds only if - all test cases pass. You can specify a maximum - of 100 tests per UrlMap. Not supported when the - URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + Request to update theUrlMap succeeds only if all + test cases pass. You can specify a maximum of + 100 tests per UrlMap. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. """ creation_timestamp: str = proto.Field( @@ -137402,7 +153287,7 @@ class UrlMapList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -137485,29 +153370,35 @@ class UrlMapTest(proto.Message): This field is a member of `oneof`_ ``_description``. expected_output_url (str): The expected output URL evaluated by the load balancer - containing the scheme, host, path and query parameters. For - rules that forward requests to backends, the test passes - only when expectedOutputUrl matches the request forwarded by + containing the scheme, host, path and query parameters. + + For rules that forward requests to backends, the test passes + only whenexpectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, - the test verifies that the forwarded request matches - hostRewrite and pathPrefixRewrite in the urlRewrite action. - When service is specified, expectedOutputUrl`s scheme is - ignored. For rules with urlRedirect, the test passes only if - expectedOutputUrl matches the URL in the load balancer's - redirect response. If urlRedirect specifies https_redirect, - the test passes only if the scheme in expectedOutputUrl is + the test verifies that the forwarded request + matcheshostRewrite and pathPrefixRewrite in theurlRewrite + action. When service is specified,expectedOutputUrl`s scheme + is ignored. + + For rules with urlRedirect, the test passes only + ifexpectedOutputUrl matches the URL in the load balancer's + redirect response. If urlRedirect specifieshttps_redirect, + the test passes only if the scheme inexpectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any - query parameters. expectedOutputUrl is optional when service - is specified. + query parameters. + + expectedOutputUrl is optional whenservice is specified. This field is a member of `oneof`_ ``_expected_output_url``. expected_redirect_response_code (int): For rules with urlRedirect, the test passes - only if expectedRedirectResponseCode matches the + only ifexpectedRedirectResponseCode matches the HTTP status code in load balancer's redirect - response. expectedRedirectResponseCode cannot be - set when service is set. + response. + + expectedRedirectResponseCode cannot be set + whenservice is set. This field is a member of `oneof`_ ``_expected_redirect_response_code``. headers (MutableSequence[google.cloud.compute_v1beta.types.UrlMapTestHeader]): @@ -137526,9 +153417,10 @@ class UrlMapTest(proto.Message): This field is a member of `oneof`_ ``_path``. service (str): Expected BackendService or BackendBucket - resource the given URL should be mapped to. The - service field cannot be set if - expectedRedirectResponseCode is set. + resource the given URL should be mapped to. + + The service field cannot + be set if expectedRedirectResponseCode is set. This field is a member of `oneof`_ ``_service``. """ @@ -137663,7 +153555,7 @@ class UrlMapsAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -137759,18 +153651,23 @@ class UrlMapsValidateRequest(proto.Message): Attributes: load_balancing_schemes (MutableSequence[str]): Specifies the load balancer type(s) this validation request - is for. Use EXTERNAL_MANAGED for global external Application + is for. UseEXTERNAL_MANAGED for global external Application Load Balancers and regional external Application Load Balancers. Use EXTERNAL for classic Application Load - Balancers. Use INTERNAL_MANAGED for internal Application - Load Balancers. For more information, refer to Choosing a - load balancer. If unspecified, the load balancing scheme - will be inferred from the backend service resources this URL - map references. If that can not be inferred (for example, - this URL map only references backend buckets, or this Url - map is for rewrites and redirects only and doesn't reference - any backends), EXTERNAL will be used as the default type. If - specified, the scheme(s) must not conflict with the load + Balancers. + + Use INTERNAL_MANAGED for internal Application Load + Balancers. For more information, refer to Choosing a load + balancer. + + If unspecified, the load balancing scheme will be inferred + from the backend service resources this URL map references. + If that can not be inferred (for example, this URL map only + references backend buckets, or this Url map is for rewrites + and redirects only and doesn't reference any + backends),EXTERNAL will be used as the default type. + + If specified, the scheme(s) must not conflict with the load balancing scheme of the backend service resources this Url map references. Check the LoadBalancingSchemes enum for the list of possible values. @@ -137848,34 +153745,46 @@ class UrlRewrite(proto.Message): host_rewrite (str): Before forwarding the request to the selected service, the request's host header is replaced - with contents of hostRewrite. The value must be - from 1 to 255 characters. + with contents of hostRewrite. + + The value must be from 1 to 255 characters. This field is a member of `oneof`_ ``_host_rewrite``. path_prefix_rewrite (str): Before forwarding the request to the selected backend service, the matching portion of the - request's path is replaced by pathPrefixRewrite. + request's path is replaced bypathPrefixRewrite. + The value must be from 1 to 1024 characters. This field is a member of `oneof`_ ``_path_prefix_rewrite``. path_template_rewrite (str): If specified, the pattern rewrites the URL path (based on - the :path header) using the HTTP template syntax. A - corresponding path_template_match must be specified. Any + the :path header) using the HTTP template syntax. + + A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match - field. - -At least one variable must be specified in the - path_template_match field - You can omit variables from the - rewritten URL - The \* and \*\* operators cannot be matched - unless they have a corresponding variable name - e.g. - {format=\*} or {var=\ **}. For example, a - path_template_match of /static/{format=**} could be - rewritten as /static/content/{format} to prefix /content to - the URL. Variables can also be re-ordered in a rewrite, so - that /{country}/{format}/{suffix=*\*} can be rewritten as - /content/{format}/{country}/{suffix}. At least one non-empty + field. + + :: + + - -At least one variable must be specified in the path_template_match + field + - You can omit variables from the rewritten URL + - The * and ** operators cannot be matched + unless they have a corresponding variable name - e.g. + {format=*} or {var=**}. + + For example, a path_template_match of /static/{format=\ **} + could be rewritten as /static/content/{format} to + prefix/content to the URL. Variables can also be re-ordered + in a rewrite, so that /{country}/{format}/{suffix=**} can be + rewritten as /content/{format}/{country}/{suffix}. + + At least one non-empty routeRules[].matchRules[].path_template_match is required. - Only one of path_prefix_rewrite or path_template_rewrite may + + Only one of path_prefix_rewrite orpath_template_rewrite may be specified. This field is a member of `oneof`_ ``_path_template_rewrite``. @@ -137940,8 +153849,8 @@ class UsableSubnetwork(proto.Message): This field is a member of `oneof`_ ``_purpose``. role (str): The role of subnetwork. Currently, this field is only used - when purpose is set to GLOBAL_MANAGED_PROXY or - REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + when purpose is set to GLOBAL_MANAGED_PROXY + orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or @@ -137954,12 +153863,13 @@ class UsableSubnetwork(proto.Message): Secondary IP ranges. stack_type (str): The stack type for the subnet. If set to IPV4_ONLY, new VMs - in the subnet are assigned IPv4 addresses only. If set to - IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 + in the subnet are assigned IPv4 addresses only. If set + toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. + This field can be both set at resource creation time and - updated using patch. Check the StackType enum for the list - of possible values. + updated usingpatch. Check the StackType enum for the list of + possible values. This field is a member of `oneof`_ ``_stack_type``. subnetwork (str): @@ -138036,9 +153946,9 @@ class Purpose(proto.Enum): class Role(proto.Enum): r"""The role of subnetwork. Currently, this field is only used when - purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. - The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is - one that is currently being used for Envoy-based load balancers in a + purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The + value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one + that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. @@ -138059,10 +153969,12 @@ class Role(proto.Enum): class StackType(proto.Enum): r"""The stack type for the subnet. If set to IPV4_ONLY, new VMs in the - subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new - VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If - not specified, IPV4_ONLY is used. This field can be both set at - resource creation time and updated using patch. + subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs + in the subnet can be assigned both IPv4 and IPv6 addresses. If not + specified, IPV4_ONLY is used. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_STACK_TYPE (0): @@ -138152,7 +154064,7 @@ class UsableSubnetworkSecondaryRange(proto.Message): The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 - characters long, and comply with RFC1035. The + characters long, and comply withRFC1035. The name must be unique within the subnetwork. This field is a member of `oneof`_ ``_range_name``. @@ -138184,19 +154096,19 @@ class UsableSubnetworksAggregatedList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.UsableSubnetwork]): [Output] A list of usable subnetwork URLs. kind (str): - [Output Only] Type of resource. Always - compute#usableSubnetworksAggregatedList for aggregated lists - of usable subnetworks. + [Output Only] Type of resource. + Alwayscompute#usableSubnetworksAggregatedList for aggregated + lists of usable subnetworks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. In special cases - listUsable may return 0 subnetworks and nextPageToken which + listUsable may return 0 subnetworks andnextPageToken which still should be used to get the next page of results. This field is a member of `oneof`_ ``_next_page_token``. @@ -138274,20 +154186,20 @@ class UsageExportLocation(proto.Message): Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the - bucket name by itself, such as example-bucket, - or the bucket name with gs:// or + bucket name by itself, such asexample-bucket, or + the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket. This field is a member of `oneof`_ ``_bucket_name``. report_name_prefix (str): An optional prefix for the name of the usage report object - stored in bucketName. If not supplied, defaults to - usage_gce. The report is stored as a CSV file named - report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the - day of the usage according to Pacific Time. If you supply a - prefix, it should conform to Cloud Storage object naming - conventions. + stored inbucketName. If not supplied, defaults tousage_gce. + The report is stored as a CSV file + namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD is + the day of the usage according to Pacific Time. If you + supply a prefix, it should conform to Cloud Storageobject + naming conventions. This field is a member of `oneof`_ ``_report_name_prefix``. """ @@ -138554,15 +154466,15 @@ class VmEndpointNatMappingsList(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#vmEndpointNatMappingsList for lists of Nat mappings - of VM endpoints. + [Output Only] Type of resource. + Alwayscompute#vmEndpointNatMappingsList for lists of Nat + mappings of VM endpoints. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -138618,20 +154530,505 @@ def raw_page(self): ) +class VmExtensionPoliciesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vm_extension_policies (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicy]): + List of VmExtensionPolicy resources contained + in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + vm_extension_policies: MutableSequence["VmExtensionPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=238490584, + message="VmExtensionPolicy", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class VmExtensionPolicy(proto.Message): + r"""Represents a VM extension policy. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + + This field is a member of `oneof`_ ``_description``. + extension_policies (MutableMapping[str, google.cloud.compute_v1beta.types.VmExtensionPolicyExtensionPolicy]): + Required. A map of extension names (e.g., + "cloudops") to their corresponding policy + configurations. + global_resource_link (str): + Optional. [Output Only] Link to the global policy that + manages this zone policy, if applicable. + + This field is a member of `oneof`_ ``_global_resource_link``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + instance_selectors (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicyInstanceSelector]): + Optional. Selectors to target VMs for this policy. VMs are + selected if they match *any* of the provided selectors + (logical OR). If this list is empty, the policy applies to + all VMs. + kind (str): + [Output Only] Type of the resource. + Alwayscompute#vmExtensionPolicy. + + This field is a member of `oneof`_ ``_kind``. + managed_by_global (bool): + Optional. [Output Only] Indicates if this policy is managed + by a global policy. + + This field is a member of `oneof`_ ``_managed_by_global``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + priority (int): + Optional. Priority of this policy. Used to + resolve conflicts when multiple policies apply + to the same extension. The policy priority is an + integer from 0 to 65535, inclusive. Lower + integers indicate higher priorities. If you do + not specify a priority when creating a rule, it + is assigned a priority of 1000. If priorities + are equal, the policy with the more recent + creation timestamp takes precedence. + + This field is a member of `oneof`_ ``_priority``. + self_link (str): + [Output Only] Server-defined fully-qualified URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + [Output Only] Server-defined URL for this resource's + resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + state (str): + Optional. [Output Only] Current state of the policy: ACTIVE + or DELETING. Check the State enum for the list of possible + values. + + This field is a member of `oneof`_ ``_state``. + update_timestamp (str): + [Output Only] Update timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_update_timestamp``. + """ + + class State(proto.Enum): + r"""Optional. [Output Only] Current state of the policy: ACTIVE or + DELETING. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + The policy is active and applied to matching + VMs. Newly created VMs that match the policy + will also receive the extension policy. + DELETING (528602024): + The policy is in the process of being + deleted. After the extension is removed from all + matching VMs, the policy will be deleted. + STATE_UNSPECIFIED (470755401): + Default value. Do not use. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + DELETING = 528602024 + STATE_UNSPECIFIED = 470755401 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + extension_policies: MutableMapping[ + str, "VmExtensionPolicyExtensionPolicy" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=227761488, + message="VmExtensionPolicyExtensionPolicy", + ) + global_resource_link: str = proto.Field( + proto.STRING, + number=516569583, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + instance_selectors: MutableSequence[ + "VmExtensionPolicyInstanceSelector" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520298826, + message="VmExtensionPolicyInstanceSelector", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + managed_by_global: bool = proto.Field( + proto.BOOL, + number=88605675, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + update_timestamp: str = proto.Field( + proto.STRING, + number=120894752, + optional=True, + ) + + +class VmExtensionPolicyAggregatedListResponse(proto.Message): + r"""Response for the aggregated list of VM extension policies. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.VmExtensionPoliciesScopedList]): + A list of VmExtensionPoliciesScopedList + resources. + kind (str): + [Output Only] Type of resource. + Alwayscompute#VmExtensionPolicyAggregatedList for lists of + VmExtensionPolicies. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "VmExtensionPoliciesScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="VmExtensionPoliciesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class VmExtensionPolicyExtensionPolicy(proto.Message): + r"""Configuration for a specific VM extension. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pinned_version (str): + Optional. The specific version of the + extension to install. If not set, the latest + version is used. + + This field is a member of `oneof`_ ``_pinned_version``. + string_config (str): + Optional. String-based configuration data for + the extension. + + This field is a member of `oneof`_ ``_string_config``. + """ + + pinned_version: str = proto.Field( + proto.STRING, + number=446267249, + optional=True, + ) + string_config: str = proto.Field( + proto.STRING, + number=318905136, + optional=True, + ) + + +class VmExtensionPolicyInstanceSelector(proto.Message): + r"""Defines how to select VMs to apply a zone VM extension + policy. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + label_selector (google.cloud.compute_v1beta.types.VmExtensionPolicyLabelSelector): + Optional. LabelSelector selects VMs based on + their labels. + + This field is a member of `oneof`_ ``_label_selector``. + """ + + label_selector: "VmExtensionPolicyLabelSelector" = proto.Field( + proto.MESSAGE, + number=349780170, + optional=True, + message="VmExtensionPolicyLabelSelector", + ) + + +class VmExtensionPolicyLabelSelector(proto.Message): + r"""A LabelSelector is applied to a VM only if it matches all the + specified labels. + + Attributes: + inclusion_labels (MutableMapping[str, str]): + Optional. A map of key-value pairs representing VM labels. + VMs must have all of the labels specified in this map to be + selected (logical AND). + + e.g. If the ``inclusion_labels`` are {("key1", "value1"), + ("key2", "value2")}, the VM labels must contain both + ("key1", "value1") and ("key2", "value2") to be selected. If + the VM labels are ("key1", "value1") and ("something", + "else"), it will not be selected. + + If the map is empty, it's considered a match. + """ + + inclusion_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=501312642, + ) + + +class VmExtensionPolicyList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + [Output Only] Fingerprint of this resource. A hash of the + contents stored in this object. This field is used in + optimistic locking. This field will be ignored when + inserting a VmExtensionPolicy. An up-to-date fingerprint + must be provided in order to update the VmExtensionPolicy. + + To see the latest value of the fingerprint, make a get() + request to retrieve a VmExtensionPolicy. + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicy]): + [Output Only] A list of VM extension policy resources. + kind (str): + Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["VmExtensionPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="VmExtensionPolicy", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + class VpnGateway(proto.Message): - r"""Represents a HA VPN gateway. HA VPN is a high-availability - (HA) Cloud VPN solution that lets you securely connect your - on-premises network to your Google Cloud Virtual Private Cloud - network through an IPsec VPN connection in a single region. For - more information about Cloud HA VPN solutions, see Cloud VPN - topologies . + r"""Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud VPN solution that lets + you securely connect your on-premises network to your Google + Cloud Virtual Private Cloud network through an IPsec VPN + connection in a single region. For more information about Cloud + HA VPN solutions, see Cloud VPN topologies . .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -138666,20 +155063,21 @@ class VpnGateway(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a VpnGateway. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a VpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -138704,11 +155102,11 @@ class VpnGateway(proto.Message): This field is a member of `oneof`_ ``_self_link``. stack_type (str): The stack type for this VPN gateway to identify the IP - protocols that are enabled. Possible values are: IPV4_ONLY, - IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if - the gateway IP version is IPV4, or IPV4_IPV6 if the gateway - IP version is IPV6. Check the StackType enum for the list of - possible values. + protocols that are enabled. Possible values are: + IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY + is used if the gateway IP version isIPV4, or IPV4_IPV6 if + the gateway IP version isIPV6. Check the StackType enum for + the list of possible values. This field is a member of `oneof`_ ``_stack_type``. vpn_interfaces (MutableSequence[google.cloud.compute_v1beta.types.VpnGatewayVpnGatewayInterface]): @@ -138737,9 +155135,9 @@ class GatewayIpVersion(proto.Enum): class StackType(proto.Enum): r"""The stack type for this VPN gateway to identify the IP protocols - that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, - IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP - version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6. + that are enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, + IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP + version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6. Values: UNDEFINED_STACK_TYPE (0): @@ -138848,7 +155246,7 @@ class VpnGatewayAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -138929,7 +155327,7 @@ class VpnGatewayList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -139009,9 +155407,9 @@ class VpnGatewayStatusHighAvailabilityRequirementState(proto.Message): Attributes: state (str): Indicates the high availability requirement state for the - VPN connection. Valid values are CONNECTION_REDUNDANCY_MET, - CONNECTION_REDUNDANCY_NOT_MET. Check the State enum for the - list of possible values. + VPN connection. Valid values are + CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. unsatisfied_reason (str): @@ -139025,8 +155423,8 @@ class VpnGatewayStatusHighAvailabilityRequirementState(proto.Message): class State(proto.Enum): r"""Indicates the high availability requirement state for the VPN - connection. Valid values are CONNECTION_REDUNDANCY_MET, - CONNECTION_REDUNDANCY_NOT_MET. + connection. Valid values are + CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. Values: UNDEFINED_STATE (0): @@ -139289,8 +155687,10 @@ class VpnGatewaysScopedList(proto.Message): class VpnTunnel(proto.Message): - r"""Represents a Cloud VPN Tunnel resource. For more information - about VPN, read the the Cloud VPN Overview. + r"""Represents a Cloud VPN Tunnel resource. + + For more information about VPN, read the + the Cloud VPN Overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -139302,7 +155702,7 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_cipher_suite``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -139341,15 +155741,16 @@ class VpnTunnel(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a VpnTunnel. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a VpnTunnel. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. local_traffic_selector (MutableSequence[str]): Local traffic selector to use when @@ -139362,7 +155763,7 @@ class VpnTunnel(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -139372,9 +155773,9 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_name``. peer_external_gateway (str): URL of the peer side external VPN gateway to - which this VPN tunnel is connected. Provided by - the client when the VPN tunnel is created. This - field is exclusive with the field + which this VPN tunnel is connected. + Provided by the client when the VPN tunnel is + created. This field is exclusive with the field peerGcpGateway. This field is a member of `oneof`_ ``_peer_external_gateway``. @@ -139440,30 +155841,41 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_shared_secret_hash``. status (str): [Output Only] The status of the VPN tunnel, which can be one - of the following: - PROVISIONING: Resource is being - allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: - Waiting to receive all VPN-related configs from the user. - Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and - Route resources are needed to setup the VPN tunnel. - - FIRST_HANDSHAKE: Successful first handshake with the peer - VPN. - ESTABLISHED: Secure session is successfully - established with the peer VPN. - NETWORK_ERROR: Deprecated, - replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth - error (for example, bad shared secret). - - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: - Resources are being deallocated for the VPN tunnel. - - FAILED: Tunnel creation has failed and the tunnel is not - ready to be used. - NO_INCOMING_PACKETS: No incoming packets - from peer. - REJECTED: Tunnel configuration was rejected, - can be result of being denied access. - - ALLOCATING_RESOURCES: Cloud VPN is in the process of - allocating all required resources. - STOPPED: Tunnel is - stopped due to its Forwarding Rules being deleted for - Classic VPN tunnels or the project is in frozen state. - - PEER_IDENTITY_MISMATCH: Peer identity does not match peer - IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic - selector narrowing not allowed for an HA-VPN tunnel. Check - the Status enum for the list of possible values. + of the following: + + :: + + - PROVISIONING: Resource is being allocated for the VPN tunnel. + - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + from + the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route + resources are needed to setup the VPN tunnel. + - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + - ESTABLISHED: Secure session is successfully established with the peer + VPN. + - NETWORK_ERROR: Deprecated, replaced by + NO_INCOMING_PACKETS + - AUTHORIZATION_ERROR: Auth error (for example, + bad shared secret). + - NEGOTIATION_FAILURE: Handshake failed. + - DEPROVISIONING: Resources are being deallocated for the VPN + tunnel. + - FAILED: Tunnel creation has failed and the tunnel is not + ready to be used. + - NO_INCOMING_PACKETS: No incoming packets from + peer. + - REJECTED: Tunnel configuration was rejected, can be result + of being denied access. + - ALLOCATING_RESOURCES: Cloud VPN is in the + process of allocating all required resources. + - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted + for Classic VPN tunnels or the project is in frozen state. + - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + probably behind NAT. + - TS_NARROWING_NOT_ALLOWED: Traffic selector + narrowing not allowed for an HA-VPN tunnel. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. target_vpn_gateway (str): @@ -139489,26 +155901,39 @@ class VpnTunnel(proto.Message): class Status(proto.Enum): r"""[Output Only] The status of the VPN tunnel, which can be one of the - following: - PROVISIONING: Resource is being allocated for the VPN - tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all - VPN-related configs from the user. Network, TargetVpnGateway, - VpnTunnel, ForwardingRule, and Route resources are needed to setup - the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with - the peer VPN. - ESTABLISHED: Secure session is successfully - established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced - by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for - example, bad shared secret). - NEGOTIATION_FAILURE: Handshake - failed. - DEPROVISIONING: Resources are being deallocated for the - VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is - not ready to be used. - NO_INCOMING_PACKETS: No incoming packets - from peer. - REJECTED: Tunnel configuration was rejected, can be - result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is - in the process of allocating all required resources. - STOPPED: - Tunnel is stopped due to its Forwarding Rules being deleted for - Classic VPN tunnels or the project is in frozen state. - - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, - probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector - narrowing not allowed for an HA-VPN tunnel. + following: + + :: + + - PROVISIONING: Resource is being allocated for the VPN tunnel. + - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + from + the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route + resources are needed to setup the VPN tunnel. + - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + - ESTABLISHED: Secure session is successfully established with the peer + VPN. + - NETWORK_ERROR: Deprecated, replaced by + NO_INCOMING_PACKETS + - AUTHORIZATION_ERROR: Auth error (for example, + bad shared secret). + - NEGOTIATION_FAILURE: Handshake failed. + - DEPROVISIONING: Resources are being deallocated for the VPN + tunnel. + - FAILED: Tunnel creation has failed and the tunnel is not + ready to be used. + - NO_INCOMING_PACKETS: No incoming packets from + peer. + - REJECTED: Tunnel configuration was rejected, can be result + of being denied access. + - ALLOCATING_RESOURCES: Cloud VPN is in the + process of allocating all required resources. + - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted + for Classic VPN tunnels or the project is in frozen state. + - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + probably behind NAT. + - TS_NARROWING_NOT_ALLOWED: Traffic selector + narrowing not allowed for an HA-VPN tunnel. Values: UNDEFINED_STATUS (0): @@ -139713,7 +156138,7 @@ class VpnTunnelAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -139822,7 +156247,7 @@ class VpnTunnelList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -139970,16 +156395,22 @@ class WafExpressionSet(proto.Message): Attributes: aliases (MutableSequence[str]): A list of alternate IDs. The format should - be: - E.g. XSS-stable Generic suffix like - "stable" is particularly useful if a policy - likes to avail newer set of expressions without - having to change the policy. A given alias name - can't be used for more than one entity set. + be: + + - E.g. XSS-stable + Generic suffix like "stable" is particularly + useful if a policy likes to avail newer set of + expressions without having to change the policy. + A given alias name can't be used for more than + one entity set. expressions (MutableSequence[google.cloud.compute_v1beta.types.WafExpressionSetExpression]): List of available expressions. id (str): Google specified expression set ID. The - format should be: - E.g. XSS-20170329 required + format should be: + + - E.g. XSS-20170329 + required This field is a member of `oneof`_ ``_id``. """ @@ -140010,11 +156441,12 @@ class WafExpressionSetExpression(proto.Message): Expression ID should uniquely identify the origin of the expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core - rule set version 2.9.1 rule id 973337. The ID - could be used to determine the individual attack - definition that has been detected. It could also - be used to exclude it from the policy in case of - false positive. required + rule set version 2.9.1 rule id 973337. + The ID could be used to determine the individual + attack definition that has been detected. It + could also be used to exclude it from the policy + in case of false positive. + required This field is a member of `oneof`_ ``_id``. sensitivity (int): @@ -140131,8 +156563,9 @@ class Warning(proto.Message): This field is a member of `oneof`_ ``_code``. data (MutableSequence[google.cloud.compute_v1beta.types.Data]): [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } message (str): [Output Only] A human-readable description of the warning code. @@ -140303,8 +156736,9 @@ class Warnings(proto.Message): This field is a member of `oneof`_ ``_code``. data (MutableSequence[google.cloud.compute_v1beta.types.Data]): [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } message (str): [Output Only] A human-readable description of the warning code. @@ -140461,9 +156895,9 @@ class Code(proto.Enum): class WeightedBackendService(proto.Message): - r"""In contrast to a single BackendService in HttpRouteAction to - which all matching traffic is directed to, - WeightedBackendService allows traffic to be split across + r"""In contrast to a single BackendService in + HttpRouteAction to which all matching traffic is directed + to,WeightedBackendService allows traffic to be split across multiple backend services. The volume of traffic for each backend service is proportional to the weight specified in each WeightedBackendService @@ -140474,39 +156908,46 @@ class WeightedBackendService(proto.Message): Attributes: backend_service (str): The full or partial URL to the default - BackendService resource. Before forwarding the - request to backendService, the load balancer - applies any relevant headerActions specified as - part of this backendServiceWeight. + BackendService resource. Before + forwarding the request to backendService, the + load balancer applies any relevant headerActions + specified as part of thisbackendServiceWeight. This field is a member of `oneof`_ ``_backend_service``. header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backendService. headerAction specified - here take effect before headerAction in the - enclosing HttpRouteRule, PathMatcher and UrlMap. + selected backendService. + + headerAction specified here take effect + beforeheaderAction in the enclosing + HttpRouteRule,PathMatcher and UrlMap. + headerAction is not supported for load balancers that have their loadBalancingScheme set to - EXTERNAL. Not supported when the URL map is - bound to a target gRPC proxy that has - validateForProxyless field set to true. + EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. weight (int): Specifies the fraction of traffic sent to a - backend service, computed as weight / (sum of - all weightedBackendService weights in - routeAction) . The selection of a backend - service is determined only for new traffic. Once - a user's request has been directed to a backend - service, subsequent requests are sent to the - same backend service as determined by the - backend service's session affinity policy. Don't - configure session affinity if you're using - weighted traffic splitting. If you do, the - weighted traffic splitting configuration takes - precedence. The value must be from 0 to 1000. + backend service, computed asweight / (sum of all + weightedBackendService weights in routeAction). + + The selection of a backend service is determined + only for new traffic. Once a user's request has + been directed to a backend service, subsequent + requests are sent to the same backend service as + determined by the backend service's session + affinity policy. Don't configure session + affinity if you're using weighted traffic + splitting. If you do, the weighted traffic + splitting configuration takes precedence. + + The value must be from 0 to 1000. This field is a member of `oneof`_ ``_weight``. """ @@ -140551,11 +156992,16 @@ class Wire(proto.Message): endpoints and Interconnect connections used by this wire in alphabetical order as follows: ``ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1``, - where: - ENDPOINT_A and ENDPOINT_B: are the labels that you - entered as map keys when you specified the wire group - endpoint objects. - CONNECTION_A1 and CONNECTION_B1: are the - labels that you entered as map keys when you specified the - wire group Interconnect objects. + where: + + :: + + - ENDPOINT_A and ENDPOINT_B: are the labels + that you entered as map keys when you specified the wire group endpoint + objects. + - CONNECTION_A1 and CONNECTION_B1: are the + labels that you entered as map keys when you specified the wire group + Interconnect objects. This field is a member of `oneof`_ ``_label``. wire_properties (google.cloud.compute_v1beta.types.WireProperties): @@ -140628,7 +157074,7 @@ class WireGroup(proto.Message): This field is a member of `oneof`_ ``_admin_enabled``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -140638,22 +157084,24 @@ class WireGroup(proto.Message): endpoints (MutableMapping[str, google.cloud.compute_v1beta.types.WireGroupEndpoint]): A map that contains the logical endpoints of the wire group. Specify key-value pairs for the - map as follows: - Key: an RFC1035 user-specified - label. - Value: an Endpoint object. + map as follows: + + - Key: an RFC1035 user-specified label. + - Value: an Endpoint object. id (int): [Output Only] The unique identifier for the resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#wireGroups for wire groups. + [Output Only] Type of the resource. Alwayscompute#wireGroups + for wire groups. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -140768,9 +157216,10 @@ class WireGroupEndpoint(proto.Message): interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.WireGroupEndpointInterconnect]): A map that contains the redundant Interconnect connections. Specify key-value - pairs for the map as follows: - Key: an RFC1035 - user-specified label. - Value: an Interconnect - object. + pairs for the map as follows: + + - Key: an RFC1035 user-specified label. + - Value: an Interconnect object. """ interconnects: MutableMapping[ @@ -140790,30 +157239,42 @@ class WireGroupEndpointInterconnect(proto.Message): Attributes: interconnect (str): - An Interconnect connection. You can specify the connection - as a partial or full URL. If the connection is in a - different project from the cross-site network, use a format - that specifies the project. See the following examples of - partial and full URLs: global/interconnects/NAME - projects/PROJECT_ID/global/interconnects/NAME - - https://compute.googleapis.com/compute/projects/PROJECT_ID - /global/interconnects/NAME + Required. An Interconnect connection. You can specify the + connection as a partial or full URL. If the connection is in + a different project from the cross-site network, use a + format that specifies the project. See the following + examples of partial and full URLs: + + :: + + global/interconnects/NAME + + + projects/PROJECT_ID/global/interconnects/NAME + + - + https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME This field is a member of `oneof`_ ``_interconnect``. vlan_tags (MutableSequence[int]): - To configure the wire group for VLAN mode, enter a VLAN tag, - which is a number from ``2`` to ``4093``. You can + Required. To configure the wire group for VLAN mode, enter a + VLAN tag, which is a number from ``2`` to ``4093``. You can autoallocate a tag by entering ``0``. To configure the wire group for port mode, enter ``-1``. Review the following - guidelines: - A VLAN tag must be unique for an Interconnect - connection across all attachments and wire groups. - Both - endpoints of a wire must use the same VLAN tag value. - - Single wire and redundant type wire groups must have only - one VLAN tag. - Port mode pseudowires must have a single - VLAN tag with a value of ``-1`` for both endpoints. - Box - and cross type wire groups must have two VLAN tags. The - first is for the same-zone pseudowire, and the second is for - the cross-zone pseudowire. + guidelines: + + :: + + - A VLAN tag must be unique for an Interconnect connection across all + attachments and wire groups. + - Both endpoints of a wire must use the same VLAN tag value. + - Single wire and redundant type wire groups must have only one + VLAN tag. + - Port mode pseudowires must have a single VLAN tag with a value of + `-1` for both endpoints. + - Box and cross type wire groups must have two VLAN tags. The first + is for the same-zone pseudowire, and the second is for the cross-zone + pseudowire. """ interconnect: str = proto.Field( @@ -140844,14 +157305,14 @@ class WireGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.WireGroup]): A list of wire group resources. kind (str): - [Output Only] Type of the resource. Always - compute#wireGroups for wire groups. + [Output Only] Type of the resource. Alwayscompute#wireGroups + for wire groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -140917,51 +157378,58 @@ def raw_page(self): class WireGroupProperties(proto.Message): - r"""The properties of a wire group. These properties determine - how a group of redundant wires are created and managed. + r"""The properties of a wire group. These properties + determine how a group of redundant wires are created and + managed. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: type_ (str): - The type of the wire group, one of the following: - WIRE: a - single pseudowire over two Interconnect connections with no - redundancy. - REDUNDANT: two pseudowires over four - Interconnect connections, with two connections in one metro - and two connections in another metro. Each redundant pair of - Interconnect connections spans both edge availability - domains of the metro. Each pseudowire connects Interconnect - connections in matching edge availability domains of the two - metros. - BOX_AND_CROSS: four pseudowires over four - Interconnect connections, with two connections in one metro - and two connections in another metro. Each redundant pair of - Interconnect connections spans both edge availability - domains of the metro. Two pseudowires connect Interconnect - connections in matching edge availability domains of the two - metros. Two additional pseudowires connect the non-matching - edge availability domains of the two metros. Check the Type - enum for the list of possible values. + The type of the wire group, one of the following: + + :: + + - WIRE: a single pseudowire over two Interconnect connections with no + redundancy. + - REDUNDANT: two pseudowires over four Interconnect connections, with + two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Each pseudowire connects Interconnect + connections in matching edge availability domains of the two metros. + - BOX_AND_CROSS: four pseudowires over four Interconnect connections, + with two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Two pseudowires connect Interconnect + connections in matching edge availability domains of the two metros. + Two additional pseudowires connect the non-matching edge availability + domains of the two metros. + + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): - r"""The type of the wire group, one of the following: - WIRE: a single - pseudowire over two Interconnect connections with no redundancy. - - REDUNDANT: two pseudowires over four Interconnect connections, with - two connections in one metro and two connections in another metro. - Each redundant pair of Interconnect connections spans both edge - availability domains of the metro. Each pseudowire connects - Interconnect connections in matching edge availability domains of - the two metros. - BOX_AND_CROSS: four pseudowires over four - Interconnect connections, with two connections in one metro and two - connections in another metro. Each redundant pair of Interconnect - connections spans both edge availability domains of the metro. Two - pseudowires connect Interconnect connections in matching edge - availability domains of the two metros. Two additional pseudowires - connect the non-matching edge availability domains of the two - metros. + r"""The type of the wire group, one of the following: + + :: + + - WIRE: a single pseudowire over two Interconnect connections with no + redundancy. + - REDUNDANT: two pseudowires over four Interconnect connections, with + two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Each pseudowire connects Interconnect + connections in matching edge availability domains of the two metros. + - BOX_AND_CROSS: four pseudowires over four Interconnect connections, + with two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Two pseudowires connect Interconnect + connections in matching edge availability domains of the two metros. + Two additional pseudowires connect the non-matching edge availability + domains of the two metros. Values: UNDEFINED_TYPE (0): @@ -141057,42 +157525,56 @@ class WireProperties(proto.Message): Attributes: bandwidth_allocation (str): The configuration of the bandwidth allocation, one of the - following: - ALLOCATE_PER_WIRE: configures a separate - unmetered bandwidth allocation (and associated charges) for - each wire in the group. - SHARED_WITH_WIRE_GROUP: this is - the default behavior, which configures one unmetered - bandwidth allocation for the wire group. The unmetered - bandwidth is divided equally across each wire in the group, - but dynamic throttling reallocates unused unmetered - bandwidth from unused or underused wires to other wires in - the group. Check the BandwidthAllocation enum for the list - of possible values. + following: + + :: + + - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation + (and associated charges) for each wire in the group. + - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures + one unmetered bandwidth allocation for the wire group. The unmetered + bandwidth is divided equally across each wire in the group, but dynamic + throttling reallocates unused unmetered bandwidth from unused or underused + wires to other wires in the group. + + Check the BandwidthAllocation enum for the list of possible + values. This field is a member of `oneof`_ ``_bandwidth_allocation``. bandwidth_unmetered (int): The unmetered bandwidth in Gigabits per second, using - decimal units. ``10`` is 10 Gbps, ``100`` is 100 Gbps. + decimal units. ``10`` is 10 Gbps, ``100`` is 100 Gbps. The + bandwidth must be greater than 0. This field is a member of `oneof`_ ``_bandwidth_unmetered``. fault_response (str): - Response when a fault is detected in a pseudowire: - NONE: - default. - DISABLE_PORT: set the port line protocol down - when inline probes detect a fault. This setting is only - permitted on port mode pseudowires. Check the FaultResponse - enum for the list of possible values. + Response when a fault is detected in a pseudowire: + + :: + + - NONE: default. + - DISABLE_PORT: set the port line protocol down when inline probes + detect a fault. This setting is only permitted on port mode + pseudowires. + + Check the FaultResponse enum for the list of possible + values. This field is a member of `oneof`_ ``_fault_response``. """ class BandwidthAllocation(proto.Enum): r"""The configuration of the bandwidth allocation, one of the following: - - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth - allocation (and associated charges) for each wire in the group. - - SHARED_WITH_WIRE_GROUP: this is the default behavior, which - configures one unmetered bandwidth allocation for the wire group. - The unmetered bandwidth is divided equally across each wire in the - group, but dynamic throttling reallocates unused unmetered bandwidth - from unused or underused wires to other wires in the group. + + :: + + - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation + (and associated charges) for each wire in the group. + - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures + one unmetered bandwidth allocation for the wire group. The unmetered + bandwidth is divided equally across each wire in the group, but dynamic + throttling reallocates unused unmetered bandwidth from unused or underused + wires to other wires in the group. Values: UNDEFINED_BANDWIDTH_ALLOCATION (0): @@ -141116,10 +157598,14 @@ class BandwidthAllocation(proto.Enum): SHARED_WITH_WIRE_GROUP = 286454628 class FaultResponse(proto.Enum): - r"""Response when a fault is detected in a pseudowire: - NONE: default. - - DISABLE_PORT: set the port line protocol down when inline probes - detect a fault. This setting is only permitted on port mode - pseudowires. + r"""Response when a fault is detected in a pseudowire: + + :: + + - NONE: default. + - DISABLE_PORT: set the port line protocol down when inline probes + detect a fault. This setting is only permitted on port mode + pseudowires. Values: UNDEFINED_FAULT_RESPONSE (0): @@ -141171,17 +157657,21 @@ class WithdrawPublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -141215,25 +157705,29 @@ class WithdrawPublicDelegatedPrefixeRequest(proto.Message): The name of the public delegated prefix. It should comply with RFC1035. region (str): - The name of the region where the public - delegated prefix is located. It should comply - with RFC1035. + The name of theregion where + the public delegated prefix is located. It + should comply with RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -141278,7 +157772,7 @@ class XpnHostList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -141381,10 +157875,11 @@ class Type(proto.Enum): class Zone(proto.Message): - r"""Represents a Zone resource. A zone is a deployment area. - These deployment areas are subsets of a region. For example the - zone us-east1-b is located in the us-east1 region. For more - information, read Regions and Zones. + r"""Represents a Zone resource. + + A zone is a deployment area. These deployment areas are subsets + of a region. For example the zone us-east1-b is located in + theus-east1 region. For more information, readRegions and Zones. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -141394,7 +157889,7 @@ class Zone(proto.Message): [Output Only] Available cpu/platform selections for the zone. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -141430,7 +157925,7 @@ class Zone(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): - [Output Only] Status of the zone, either UP or DOWN. Check + [Output Only] Status of the zone, either UP orDOWN. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. @@ -141441,7 +157936,7 @@ class Zone(proto.Message): """ class Status(proto.Enum): - r"""[Output Only] Status of the zone, either UP or DOWN. + r"""[Output Only] Status of the zone, either UP orDOWN. Values: UNDEFINED_STATUS (0): @@ -141533,7 +158028,7 @@ class ZoneList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -141619,6 +158114,50 @@ class ZoneSetLabelsRequest(proto.Message): ) +class ZoneSetNestedPolicyRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): + Flatten Policy to create a backwacd + compatible wire-format. Deprecated. Use 'policy' + to specify bindings. + etag (str): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify the etag. + + This field is a member of `oneof`_ ``_etag``. + policy (google.cloud.compute_v1beta.types.Policy): + REQUIRED: The complete policy to be applied + to the 'resource'. The size of the policy is + limited to a few 10s of KB. An empty policy is + in general a valid policy but certain services + (like Projects) might reject them. + + This field is a member of `oneof`_ ``_policy``. + """ + + bindings: MutableSequence["Binding"] = proto.RepeatedField( + proto.MESSAGE, + number=403251854, + message="Binding", + ) + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + policy: "Policy" = proto.Field( + proto.MESSAGE, + number=91071794, + optional=True, + message="Policy", + ) + + class ZoneSetPolicyRequest(proto.Message): r""" diff --git a/packages/google-cloud-compute-v1beta/noxfile.py b/packages/google-cloud-compute-v1beta/noxfile.py index 61015edd1168..0521fd58c78d 100644 --- a/packages/google-cloud-compute-v1beta/noxfile.py +++ b/packages/google-cloud-compute-v1beta/noxfile.py @@ -256,6 +256,7 @@ def unit(session, protobuf_implementation): # Run py.test against the unit tests. session.run( "py.test", + "-vvv", "--quiet", f"--junitxml=unit_{session.python}_sponge_log.xml", "--cov=google", diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py new file mode 100644 index 000000000000..8f805c8930bf --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_BackendBuckets_AggregatedList_sync] +# 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 compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.BackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListBackendBucketsRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_BackendBuckets_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py new file mode 100644 index 000000000000..be0f68048bbe --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync] +# 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 compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py new file mode 100644 index 000000000000..72a53b775dba --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync] +# 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 compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py new file mode 100644 index 000000000000..edf89c30ef8a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAvailableAcceleratorTopologies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync] +# 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 compute_v1beta + + +def sample_get_available_accelerator_topologies(): + # Create a client + client = compute_v1beta.InstanceGroupManagersClient() + + # Initialize request argument(s) + request = ( + compute_v1beta.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + project="project_value", + resource_id="resource_id_value", + zone="zone_value", + ) + ) + + # Make the request + response = client.get_available_accelerator_topologies(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py new file mode 100644 index 000000000000..e15a52abfbf9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Delete_sync] +# 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 compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py new file mode 100644 index 000000000000..fcd43c7978c3 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py new file mode 100644 index 000000000000..e753d44b1b9f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Get_sync] +# 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 compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py new file mode 100644 index 000000000000..4914686f7b36 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Insert_sync] +# 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 compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py new file mode 100644 index 000000000000..42685c31231c --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_List_sync] +# 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 compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py new file mode 100644 index 000000000000..68b9f2d61d63 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListUsable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync] +# 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 compute_v1beta + + +def sample_list_usable(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListUsableRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list_usable(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py new file mode 100644 index 000000000000..2492ef59247a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Patch_sync] +# 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 compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py new file mode 100644 index 000000000000..4bb87b975c80 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py new file mode 100644 index 000000000000..13939dee4eb1 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync] +# 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 compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py new file mode 100644 index 000000000000..9102f7995f83 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync] +# 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 compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionCompositeHealthChecksRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py new file mode 100644 index 000000000000..360fdd0dbfc9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync] +# 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 compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py new file mode 100644 index 000000000000..9d1e853c5c5d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync] +# 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 compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py new file mode 100644 index 000000000000..a26c44113523 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync] +# 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 compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py new file mode 100644 index 000000000000..c1c01bda7826 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_List_sync] +# 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 compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionCompositeHealthChecksRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py new file mode 100644 index 000000000000..79d284ba2c82 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync] +# 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 compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..e7733799c610 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync] +# 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 compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py new file mode 100644 index 000000000000..8680aa6cfc16 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync] +# 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 compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionHealthAggregationPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py new file mode 100644 index 000000000000..df10d5678b38 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync] +# 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 compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py new file mode 100644 index 000000000000..30098a1b4b91 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync] +# 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 compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py new file mode 100644 index 000000000000..38876b073754 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync] +# 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 compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py new file mode 100644 index 000000000000..3846ad0d53ab --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync] +# 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 compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionHealthAggregationPoliciesRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py new file mode 100644 index 000000000000..58d90a9cffee --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync] +# 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 compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py new file mode 100644 index 000000000000..241c63e77e19 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync] +# 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 compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py new file mode 100644 index 000000000000..f58dd0d1044c --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py new file mode 100644 index 000000000000..44b0852901f5 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..ec107223f53d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync] +# 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 compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py new file mode 100644 index 000000000000..5315c0935dad --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py new file mode 100644 index 000000000000..e6631fc46cf6 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync] +# 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 compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..e95fb20146b9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync] +# 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 compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py new file mode 100644 index 000000000000..5c20c1ac4786 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync] +# 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 compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py new file mode 100644 index 000000000000..83d482a0e863 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync] +# 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 compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py new file mode 100644 index 000000000000..4aae87022713 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync] +# 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 compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py new file mode 100644 index 000000000000..039b42926725 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync] +# 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 compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListZoneVmExtensionPoliciesRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py new file mode 100644 index 000000000000..d0b1ea91a9e9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Update +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync] +# 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 compute_v1beta + + +def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json b/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json index d1f1fc2ac213..adb559e8c4b0 100644 --- a/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json @@ -1839,6 +1839,86 @@ ], "title": "compute_v1beta_generated_backend_buckets_add_signed_url_key_sync.py" }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.BackendBucketsClient", + "shortName": "BackendBucketsClient" + }, + "fullName": "google.cloud.compute_v1beta.BackendBucketsClient.aggregated_list", + "method": { + "fullName": "google.cloud.compute.v1beta.BackendBuckets.AggregatedList", + "service": { + "fullName": "google.cloud.compute.v1beta.BackendBuckets", + "shortName": "BackendBuckets" + }, + "shortName": "AggregatedList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.backend_buckets.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_backend_buckets_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_BackendBuckets_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_backend_buckets_aggregated_list_sync.py" + }, { "canonical": true, "clientMethod": { @@ -14099,22 +14179,22 @@ "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.AggregatedList", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest" }, { "name": "project", @@ -14133,14 +14213,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.AggregatedListPager", + "resultType": "google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.AggregatedListPager", "shortName": "aggregated_list" }, "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_health_checks_aggregated_list_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync", "segments": [ { "end": 52, @@ -14173,119 +14253,35 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_aggregated_list_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" - }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.delete", - "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Delete", - "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" - }, - "shortName": "Delete" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteHealthCheckRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "health_check", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" - }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_health_checks_delete_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Delete_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_health_checks_delete_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.get", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Get", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.GetGlobalVmExtensionPolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "health_check", + "name": "global_vm_extension_policy", "type": "str" }, { @@ -14301,14 +14297,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "resultType": "google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_health_checks_get_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Get_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync", "segments": [ { "end": 52, @@ -14341,7 +14337,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_get_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_get_sync.py" }, { "canonical": true, @@ -14350,28 +14346,24 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.insert", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Insert", + "fullName": "google.cloud.compute.v1beta.HealthChecks.AggregatedList", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "Insert" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListHealthChecksRequest" }, { "name": "project", "type": "str" }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14385,22 +14377,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_health_checks_insert_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_health_checks_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Insert_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_AggregatedList_sync", "segments": [ { - "end": 51, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 52, "start": 27, "type": "SHORT" }, @@ -14420,12 +14412,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 53, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_insert_sync.py" + "title": "compute_v1beta_generated_health_checks_aggregated_list_sync.py" }, { "canonical": true, @@ -14434,24 +14426,28 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.list", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.List", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Delete", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.DeleteHealthCheckRequest" }, { "name": "project", "type": "str" }, + { + "name": "health_check", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14465,14 +14461,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_health_checks_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_List_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Delete_sync", "segments": [ { "end": 52, @@ -14490,22 +14486,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 49, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_list_sync.py" + "title": "compute_v1beta_generated_health_checks_delete_sync.py" }, { "canonical": true, @@ -14514,19 +14510,19 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.patch", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Patch", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Get", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.GetHealthCheckRequest" }, { "name": "project", @@ -14536,10 +14532,6 @@ "name": "health_check", "type": "str" }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14553,14 +14545,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_health_checks_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Patch_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Get_sync", "segments": [ { "end": 52, @@ -14593,7 +14585,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_patch_sync.py" + "title": "compute_v1beta_generated_health_checks_get_sync.py" }, { "canonical": true, @@ -14602,31 +14594,27 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Insert", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.InsertHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -14641,22 +14629,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Insert_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -14666,22 +14654,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_health_checks_insert_sync.py" }, { "canonical": true, @@ -14690,32 +14678,24 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.update", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Update", + "fullName": "google.cloud.compute.v1beta.HealthChecks.List", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "Update" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.ListHealthChecksRequest" }, { "name": "project", "type": "str" }, - { - "name": "health_check", - "type": "str" - }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14729,14 +14709,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_health_checks_update_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Update_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_List_sync", "segments": [ { "end": 52, @@ -14754,55 +14734,55 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_update_sync.py" + "title": "compute_v1beta_generated_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient", - "shortName": "ImageFamilyViewsClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient.get", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.ImageFamilyViews.Get", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.ImageFamilyViews", - "shortName": "ImageFamilyViews" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Get" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetImageFamilyViewRequest" + "type": "google.cloud.compute_v1beta.types.PatchHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "health_check", "type": "str" }, { - "name": "family", - "type": "str" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -14817,22 +14797,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ImageFamilyView", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_image_family_views_get_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ImageFamilyViews_Get_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Patch_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -14842,52 +14822,56 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_image_family_views_get_sync.py" + "title": "compute_v1beta_generated_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.delete", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Delete", + "fullName": "google.cloud.compute.v1beta.HealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Delete" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteImageRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "image", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14901,14 +14885,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_images_delete_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Delete_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_TestIamPermissions_sync", "segments": [ { "end": 52, @@ -14941,40 +14925,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_delete_sync.py" + "title": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.deprecate", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Deprecate", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Deprecate" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeprecateImageRequest" + "type": "google.cloud.compute_v1beta.types.UpdateHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "image", + "name": "health_check", "type": "str" }, { - "name": "deprecation_status_resource", - "type": "google.cloud.compute_v1beta.types.DeprecationStatus" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -14990,13 +14974,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "deprecate" + "shortName": "update" }, - "description": "Sample for Deprecate", - "file": "compute_v1beta_generated_images_deprecate_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_health_checks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Deprecate_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Update_sync", "segments": [ { "end": 52, @@ -15029,33 +15013,37 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_deprecate_sync.py" + "title": "compute_v1beta_generated_health_checks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient", + "shortName": "ImageFamilyViewsClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.get_from_family", + "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.Images.GetFromFamily", + "fullName": "google.cloud.compute.v1beta.ImageFamilyViews.Get", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.ImageFamilyViews", + "shortName": "ImageFamilyViews" }, - "shortName": "GetFromFamily" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetFromFamilyImageRequest" + "type": "google.cloud.compute_v1beta.types.GetImageFamilyViewRequest" }, { "name": "project", "type": "str" }, + { + "name": "zone", + "type": "str" + }, { "name": "family", "type": "str" @@ -15073,22 +15061,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Image", - "shortName": "get_from_family" + "resultType": "google.cloud.compute_v1beta.types.ImageFamilyView", + "shortName": "get" }, - "description": "Sample for GetFromFamily", - "file": "compute_v1beta_generated_images_get_from_family_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_image_family_views_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_GetFromFamily_sync", + "regionTag": "compute_v1beta_generated_ImageFamilyViews_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -15098,22 +15086,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_get_from_family_sync.py" + "title": "compute_v1beta_generated_image_family_views_get_sync.py" }, { "canonical": true, @@ -15122,26 +15110,26 @@ "fullName": "google.cloud.compute_v1beta.ImagesClient", "shortName": "ImagesClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.ImagesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.Images.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.Images.Delete", "service": { "fullName": "google.cloud.compute.v1beta.Images", "shortName": "Images" }, - "shortName": "GetIamPolicy" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyImageRequest" + "type": "google.cloud.compute_v1beta.types.DeleteImageRequest" }, { "name": "project", "type": "str" }, { - "name": "resource", + "name": "image", "type": "str" }, { @@ -15157,14 +15145,270 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_images_get_iam_policy_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_images_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_Images_Delete_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.deprecate", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.Deprecate", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "Deprecate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeprecateImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "image", + "type": "str" + }, + { + "name": "deprecation_status_resource", + "type": "google.cloud.compute_v1beta.types.DeprecationStatus" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "deprecate" + }, + "description": "Sample for Deprecate", + "file": "compute_v1beta_generated_images_deprecate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_Deprecate_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_deprecate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.get_from_family", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.GetFromFamily", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "GetFromFamily" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetFromFamilyImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "family", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Image", + "shortName": "get_from_family" + }, + "description": "Sample for GetFromFamily", + "file": "compute_v1beta_generated_images_get_from_family_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_GetFromFamily_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_get_from_family_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.get_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.GetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetIamPolicyImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_images_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_GetIamPolicy_sync", "segments": [ { "end": 52, @@ -16890,19 +17134,19 @@ "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient", "shortName": "InstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient.get", + "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient.get_available_accelerator_topologies", "method": { - "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers.Get", + "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers.GetAvailableAcceleratorTopologies", "service": { "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers", "shortName": "InstanceGroupManagers" }, - "shortName": "Get" + "shortName": "GetAvailableAcceleratorTopologies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest" }, { "name": "project", @@ -16913,7 +17157,7 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource_id", "type": "str" }, { @@ -16929,14 +17173,102 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "shortName": "get_available_accelerator_topologies" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_instance_group_managers_get_sync.py", + "description": "Sample for GetAvailableAcceleratorTopologies", + "file": "compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_InstanceGroupManagers_Get_sync", + "regionTag": "compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient", + "shortName": "InstanceGroupManagersClient" + }, + "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "shortName": "InstanceGroupManagers" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetInstanceGroupManagerRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_instance_group_managers_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_InstanceGroupManagers_Get_sync", "segments": [ { "end": 53, @@ -44251,22 +44583,22 @@ "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Delete", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest" }, { "name": "project", @@ -44277,7 +44609,7 @@ "type": "str" }, { - "name": "backend_service", + "name": "backend_bucket", "type": "str" }, { @@ -44297,102 +44629,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_backend_services_delete_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Delete_sync", - "segments": [ - { - "end": 53, - "start": 27, - "type": "FULL" - }, - { - "end": 53, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 47, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 50, - "start": 48, - "type": "REQUEST_EXECUTION" - }, - { - "end": 54, - "start": 51, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_backend_services_delete_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_health", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetHealth", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" - }, - "shortName": "GetHealth" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.GetHealthRegionBackendServiceRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "region", - "type": "str" - }, - { - "name": "backend_service", - "type": "str" - }, - { - "name": "resource_group_reference_resource", - "type": "google.cloud.compute_v1beta.types.ResourceGroupReference" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.cloud.compute_v1beta.types.BackendServiceGroupHealth", - "shortName": "get_health" - }, - "description": "Sample for GetHealth", - "file": "compute_v1beta_generated_region_backend_services_get_health_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_GetHealth_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Delete_sync", "segments": [ { "end": 53, @@ -44425,28 +44665,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_health_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendBucketRequest" }, { "name": "project", @@ -44477,10 +44717,10 @@ "shortName": "get_iam_policy" }, "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -44513,28 +44753,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionBackendBucketRequest" }, { "name": "project", @@ -44545,7 +44785,7 @@ "type": "str" }, { - "name": "backend_service", + "name": "backend_bucket", "type": "str" }, { @@ -44561,14 +44801,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.BackendService", + "resultType": "google.cloud.compute_v1beta.types.BackendBucket", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_backend_services_get_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Get_sync", "segments": [ { "end": 53, @@ -44601,28 +44841,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Insert", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest" }, { "name": "project", @@ -44633,8 +44873,8 @@ "type": "str" }, { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" + "name": "backend_bucket_resource", + "type": "google.cloud.compute_v1beta.types.BackendBucket" }, { "name": "retry", @@ -44653,10 +44893,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_backend_services_insert_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Insert_sync", "segments": [ { "end": 52, @@ -44689,28 +44929,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_insert_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list_usable", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.list_usable", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.ListUsable", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.ListUsable", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "ListUsable" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendServicesRequest" + "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest" }, { "name": "project", @@ -44733,14 +44973,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListUsablePager", + "resultType": "google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListUsablePager", "shortName": "list_usable" }, "description": "Sample for ListUsable", - "file": "compute_v1beta_generated_region_backend_services_list_usable_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_list_usable_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_ListUsable_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync", "segments": [ { "end": 53, @@ -44773,28 +45013,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_list_usable_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_list_usable_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.List", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionBackendServicesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest" }, { "name": "project", @@ -44817,14 +45057,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_backend_services_list_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_List_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_List_sync", "segments": [ { "end": 53, @@ -44857,28 +45097,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_list_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Patch", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest" }, { "name": "project", @@ -44889,12 +45129,12 @@ "type": "str" }, { - "name": "backend_service", + "name": "backend_bucket", "type": "str" }, { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" + "name": "backend_bucket_resource", + "type": "google.cloud.compute_v1beta.types.BackendBucket" }, { "name": "retry", @@ -44913,10 +45153,10 @@ "shortName": "patch" }, "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_backend_services_patch_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Patch_sync", "segments": [ { "end": 53, @@ -44949,28 +45189,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_patch_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendBucketRequest" }, { "name": "project", @@ -45005,10 +45245,10 @@ "shortName": "set_iam_policy" }, "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -45041,28 +45281,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_security_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetSecurityPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "SetSecurityPolicy" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetSecurityPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendBucketRequest" }, { "name": "project", @@ -45073,12 +45313,12 @@ "type": "str" }, { - "name": "backend_service", + "name": "resource", "type": "str" }, { - "name": "security_policy_reference_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyReference" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -45093,14 +45333,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_security_policy" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for SetSecurityPolicy", - "file": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_SetSecurityPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -45133,7 +45373,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py" }, { "canonical": true, @@ -45142,19 +45382,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Delete", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "TestIamPermissions" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendServiceRequest" }, { "name": "project", @@ -45165,13 +45405,9 @@ "type": "str" }, { - "name": "resource", + "name": "backend_service", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45185,14 +45421,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_backend_services_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Delete_sync", "segments": [ { "end": 53, @@ -45225,7 +45461,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_backend_services_delete_sync.py" }, { "canonical": true, @@ -45234,19 +45470,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.update", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_health", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Update", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetHealth", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "Update" + "shortName": "GetHealth" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetHealthRegionBackendServiceRequest" }, { "name": "project", @@ -45261,8 +45497,8 @@ "type": "str" }, { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" + "name": "resource_group_reference_resource", + "type": "google.cloud.compute_v1beta.types.ResourceGroupReference" }, { "name": "retry", @@ -45277,14 +45513,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.BackendServiceGroupHealth", + "shortName": "get_health" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_backend_services_update_sync.py", + "description": "Sample for GetHealth", + "file": "compute_v1beta_generated_region_backend_services_get_health_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Update_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_GetHealth_sync", "segments": [ { "end": 53, @@ -45317,33 +45553,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_update_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_health_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "AggregatedList" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCommitmentsRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendServiceRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45357,22 +45601,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_GetIamPolicy_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -45382,43 +45626,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionBackendServiceRequest" }, { "name": "project", @@ -45429,7 +45673,7 @@ "type": "str" }, { - "name": "commitment", + "name": "backend_service", "type": "str" }, { @@ -45445,14 +45689,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Commitment", + "resultType": "google.cloud.compute_v1beta.types.BackendService", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_commitments_get_sync.py", + "file": "compute_v1beta_generated_region_backend_services_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Get_sync", "segments": [ { "end": 53, @@ -45485,28 +45729,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_get_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Insert", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionBackendServiceRequest" }, { "name": "project", @@ -45517,8 +45761,8 @@ "type": "str" }, { - "name": "commitment_resource", - "type": "google.cloud.compute_v1beta.types.Commitment" + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" }, { "name": "retry", @@ -45537,10 +45781,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_commitments_insert_sync.py", + "file": "compute_v1beta_generated_region_backend_services_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Insert_sync", "segments": [ { "end": 52, @@ -45573,28 +45817,112 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_insert_sync.py" + "title": "compute_v1beta_generated_region_backend_services_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list_usable", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.List", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.ListUsable", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" + }, + "shortName": "ListUsable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendServicesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListUsablePager", + "shortName": "list_usable" + }, + "description": "Sample for ListUsable", + "file": "compute_v1beta_generated_region_backend_services_list_usable_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionBackendServices_ListUsable_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_backend_services_list_usable_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionCommitmentsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionBackendServicesRequest" }, { "name": "project", @@ -45617,14 +45945,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_commitments_list_sync.py", + "file": "compute_v1beta_generated_region_backend_services_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_List_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_List_sync", "segments": [ { "end": 53, @@ -45657,28 +45985,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_list_sync.py" + "title": "compute_v1beta_generated_region_backend_services_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "TestIamPermissions" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionBackendServiceRequest" }, { "name": "project", @@ -45689,12 +46017,12 @@ "type": "str" }, { - "name": "resource", + "name": "backend_service", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" }, { "name": "retry", @@ -45709,14 +46037,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_backend_services_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Patch_sync", "segments": [ { "end": 53, @@ -45749,28 +46077,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_backend_services_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update_reservations", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.UpdateReservations", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "UpdateReservations" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateReservationsRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendServiceRequest" }, { "name": "project", @@ -45781,12 +46109,12 @@ "type": "str" }, { - "name": "commitment", + "name": "resource", "type": "str" }, { - "name": "region_commitments_update_reservations_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionCommitmentsUpdateReservationsRequest" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -45801,14 +46129,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update_reservations" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for UpdateReservations", - "file": "compute_v1beta_generated_region_commitments_update_reservations_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_UpdateReservations_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -45841,28 +46169,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_update_reservations_sync.py" + "title": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_security_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Update", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetSecurityPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Update" + "shortName": "SetSecurityPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.SetSecurityPolicyRegionBackendServiceRequest" }, { "name": "project", @@ -45873,12 +46201,12 @@ "type": "str" }, { - "name": "commitment", + "name": "backend_service", "type": "str" }, { - "name": "commitment_resource", - "type": "google.cloud.compute_v1beta.types.Commitment" + "name": "security_policy_reference_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyReference" }, { "name": "retry", @@ -45894,13 +46222,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "set_security_policy" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_commitments_update_sync.py", + "description": "Sample for SetSecurityPolicy", + "file": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Update_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_SetSecurityPolicy_sync", "segments": [ { "end": 53, @@ -45933,28 +46261,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_update_sync.py" + "title": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", - "shortName": "RegionDiskSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", - "shortName": "RegionDiskSettings" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskSettingRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendServiceRequest" }, { "name": "project", @@ -45964,6 +46292,14 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45977,22 +46313,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DiskSettings", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disk_settings_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskSettings_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_TestIamPermissions_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46002,43 +46338,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_settings_get_sync.py" + "title": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", - "shortName": "RegionDiskSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Patch", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", - "shortName": "RegionDiskSettings" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Patch" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionDiskSettingRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionBackendServiceRequest" }, { "name": "project", @@ -46049,8 +46385,12 @@ "type": "str" }, { - "name": "disk_settings_resource", - "type": "google.cloud.compute_v1beta.types.DiskSettings" + "name": "backend_service", + "type": "str" + }, + { + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" }, { "name": "retry", @@ -46066,21 +46406,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "update" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_disk_settings_patch_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_backend_services_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskSettings_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Update_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46090,56 +46430,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_settings_patch_sync.py" + "title": "compute_v1beta_generated_region_backend_services_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", - "shortName": "RegionDiskTypesClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.Get", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", - "shortName": "RegionDiskTypes" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "Get" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskTypeRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCommitmentsRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "disk_type", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46153,22 +46485,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DiskType", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disk_types_get_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskTypes_Get_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_AggregatedList_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -46178,43 +46510,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_types_get_sync.py" + "title": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", - "shortName": "RegionDiskTypesClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.List", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", - "shortName": "RegionDiskTypes" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionDiskTypesRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionCommitmentRequest" }, { "name": "project", @@ -46224,6 +46556,10 @@ "name": "region", "type": "str" }, + { + "name": "commitment", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46237,14 +46573,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_disk_types.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Commitment", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_disk_types_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_commitments_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskTypes_List_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Get_sync", "segments": [ { "end": 53, @@ -46262,43 +46598,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_types_list_sync.py" + "title": "compute_v1beta_generated_region_commitments_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.add_resource_policies", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.AddResourcePolicies", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "AddResourcePolicies" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddResourcePoliciesRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionCommitmentRequest" }, { "name": "project", @@ -46309,12 +46645,8 @@ "type": "str" }, { - "name": "disk", - "type": "str" - }, - { - "name": "region_disks_add_resource_policies_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksAddResourcePoliciesRequest" + "name": "commitment_resource", + "type": "google.cloud.compute_v1beta.types.Commitment" }, { "name": "retry", @@ -46330,21 +46662,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_resource_policies" + "shortName": "insert" }, - "description": "Sample for AddResourcePolicies", - "file": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_commitments_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_AddResourcePolicies_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -46354,43 +46686,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py" + "title": "compute_v1beta_generated_region_commitments_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.bulk_insert", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.BulkInsert", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "BulkInsert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.BulkInsertRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionCommitmentsRequest" }, { "name": "project", @@ -46400,10 +46732,6 @@ "name": "region", "type": "str" }, - { - "name": "bulk_insert_disk_resource_resource", - "type": "google.cloud.compute_v1beta.types.BulkInsertDiskResource" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46417,22 +46745,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "bulk_insert" + "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for BulkInsert", - "file": "compute_v1beta_generated_region_disks_bulk_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_commitments_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_BulkInsert_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46452,33 +46780,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_bulk_insert_sync.py" + "title": "compute_v1beta_generated_region_commitments_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.create_snapshot", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.CreateSnapshot", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "CreateSnapshot" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CreateSnapshotRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCommitmentRequest" }, { "name": "project", @@ -46489,12 +46817,12 @@ "type": "str" }, { - "name": "disk", + "name": "resource", "type": "str" }, { - "name": "snapshot_resource", - "type": "google.cloud.compute_v1beta.types.Snapshot" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -46509,14 +46837,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "create_snapshot" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for CreateSnapshot", - "file": "compute_v1beta_generated_region_disks_create_snapshot_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_CreateSnapshot_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -46549,28 +46877,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_create_snapshot_sync.py" + "title": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update_reservations", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Delete", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.UpdateReservations", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "Delete" + "shortName": "UpdateReservations" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.UpdateReservationsRegionCommitmentRequest" }, { "name": "project", @@ -46581,9 +46909,13 @@ "type": "str" }, { - "name": "disk", + "name": "commitment", "type": "str" }, + { + "name": "region_commitments_update_reservations_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionCommitmentsUpdateReservationsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46598,13 +46930,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "update_reservations" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_disks_delete_sync.py", + "description": "Sample for UpdateReservations", + "file": "compute_v1beta_generated_region_commitments_update_reservations_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_UpdateReservations_sync", "segments": [ { "end": 53, @@ -46637,28 +46969,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_delete_sync.py" + "title": "compute_v1beta_generated_region_commitments_update_reservations_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "GetIamPolicy" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionCommitmentRequest" }, { "name": "project", @@ -46669,9 +47001,13 @@ "type": "str" }, { - "name": "resource", + "name": "commitment", "type": "str" }, + { + "name": "commitment_resource", + "type": "google.cloud.compute_v1beta.types.Commitment" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46685,14 +47021,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_commitments_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Update_sync", "segments": [ { "end": 53, @@ -46725,41 +47061,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_commitments_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Get", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "Get" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "disk", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46773,22 +47101,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Disk", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disks_get_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Get_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -46798,43 +47126,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_get_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Insert", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -46845,8 +47173,8 @@ "type": "str" }, { - "name": "disk_resource", - "type": "google.cloud.compute_v1beta.types.Disk" + "name": "composite_health_check", + "type": "str" }, { "name": "retry", @@ -46862,21 +47190,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_disks_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_composite_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46886,43 +47214,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_insert_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.list", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.List", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionDisksRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -46932,6 +47260,10 @@ "name": "region", "type": "str" }, + { + "name": "composite_health_check", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46945,14 +47277,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_disks.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.CompositeHealthCheck", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_disks_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_composite_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_List_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync", "segments": [ { "end": 53, @@ -46970,43 +47302,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_list_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.remove_resource_policies", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.RemoveResourcePolicies", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "RemoveResourcePolicies" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveResourcePoliciesRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -47017,12 +47349,8 @@ "type": "str" }, { - "name": "disk", - "type": "str" - }, - { - "name": "region_disks_remove_resource_policies_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest" + "name": "composite_health_check_resource", + "type": "google.cloud.compute_v1beta.types.CompositeHealthCheck" }, { "name": "retry", @@ -47038,21 +47366,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_resource_policies" + "shortName": "insert" }, - "description": "Sample for RemoveResourcePolicies", - "file": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_composite_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_RemoveResourcePolicies_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47062,43 +47390,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.resize", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Resize", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "Resize" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest" }, { "name": "project", @@ -47108,14 +47436,6 @@ "name": "region", "type": "str" }, - { - "name": "disk", - "type": "str" - }, - { - "name": "region_disks_resize_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksResizeRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47129,14 +47449,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize" + "resultType": "google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Resize", - "file": "compute_v1beta_generated_region_disks_resize_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_composite_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Resize_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_List_sync", "segments": [ { "end": 53, @@ -47154,43 +47474,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_resize_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "SetIamPolicy" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -47201,12 +47521,12 @@ "type": "str" }, { - "name": "resource", + "name": "composite_health_check", "type": "str" }, { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + "name": "composite_health_check_resource", + "type": "google.cloud.compute_v1beta.types.CompositeHealthCheck" }, { "name": "retry", @@ -47221,14 +47541,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_composite_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync", "segments": [ { "end": 53, @@ -47261,28 +47581,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "SetLabels" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -47297,8 +47617,8 @@ "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -47313,14 +47633,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_disks_set_labels_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -47353,28 +47673,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_set_labels_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", + "shortName": "RegionDiskSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.start_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StartAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", + "shortName": "RegionDiskSettings" }, - "shortName": "StartAsyncReplication" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StartAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskSettingRequest" }, { "name": "project", @@ -47384,14 +47704,6 @@ "name": "region", "type": "str" }, - { - "name": "disk", - "type": "str" - }, - { - "name": "region_disks_start_async_replication_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksStartAsyncReplicationRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47405,22 +47717,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "start_async_replication" + "resultType": "google.cloud.compute_v1beta.types.DiskSettings", + "shortName": "get" }, - "description": "Sample for StartAsyncReplication", - "file": "compute_v1beta_generated_region_disks_start_async_replication_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_disk_settings_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StartAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDiskSettings_Get_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47430,43 +47742,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_start_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disk_settings_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", + "shortName": "RegionDiskSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StopAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", + "shortName": "RegionDiskSettings" }, - "shortName": "StopAsyncReplication" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionDiskSettingRequest" }, { "name": "project", @@ -47477,8 +47789,8 @@ "type": "str" }, { - "name": "disk", - "type": "str" + "name": "disk_settings_resource", + "type": "google.cloud.compute_v1beta.types.DiskSettings" }, { "name": "retry", @@ -47494,21 +47806,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_async_replication" + "shortName": "patch" }, - "description": "Sample for StopAsyncReplication", - "file": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_disk_settings_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StopAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDiskSettings_Patch_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47518,43 +47830,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disk_settings_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", + "shortName": "RegionDiskTypesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_group_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StopGroupAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", + "shortName": "RegionDiskTypes" }, - "shortName": "StopGroupAsyncReplication" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopGroupAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskTypeRequest" }, { "name": "project", @@ -47565,8 +47877,8 @@ "type": "str" }, { - "name": "disks_stop_group_async_replication_resource_resource", - "type": "google.cloud.compute_v1beta.types.DisksStopGroupAsyncReplicationResource" + "name": "disk_type", + "type": "str" }, { "name": "retry", @@ -47581,22 +47893,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_group_async_replication" + "resultType": "google.cloud.compute_v1beta.types.DiskType", + "shortName": "get" }, - "description": "Sample for StopGroupAsyncReplication", - "file": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_disk_types_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StopGroupAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDiskTypes_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -47606,43 +47918,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disk_types_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", + "shortName": "RegionDiskTypesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", + "shortName": "RegionDiskTypes" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionDiskTypesRequest" }, { "name": "project", @@ -47652,14 +47964,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47673,14 +47977,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.region_disk_types.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_disk_types_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDiskTypes_List_sync", "segments": [ { "end": 53, @@ -47698,22 +48002,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disk_types_list_sync.py" }, { "canonical": true, @@ -47722,19 +48026,19 @@ "fullName": "google.cloud.compute_v1beta.RegionDisksClient", "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.update", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.add_resource_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Update", + "fullName": "google.cloud.compute.v1beta.RegionDisks.AddResourcePolicies", "service": { "fullName": "google.cloud.compute.v1beta.RegionDisks", "shortName": "RegionDisks" }, - "shortName": "Update" + "shortName": "AddResourcePolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.AddResourcePoliciesRegionDiskRequest" }, { "name": "project", @@ -47749,8 +48053,8 @@ "type": "str" }, { - "name": "disk_resource", - "type": "google.cloud.compute_v1beta.types.Disk" + "name": "region_disks_add_resource_policies_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksAddResourcePoliciesRequest" }, { "name": "retry", @@ -47766,13 +48070,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "add_resource_policies" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_disks_update_sync.py", + "description": "Sample for AddResourcePolicies", + "file": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Update_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_AddResourcePolicies_sync", "segments": [ { "end": 53, @@ -47805,28 +48109,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_update_sync.py" + "title": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.bulk_insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Delete", + "fullName": "google.cloud.compute.v1beta.RegionDisks.BulkInsert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Delete" + "shortName": "BulkInsert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.BulkInsertRegionDiskRequest" }, { "name": "project", @@ -47837,8 +48141,8 @@ "type": "str" }, { - "name": "health_check_service", - "type": "str" + "name": "bulk_insert_disk_resource_resource", + "type": "google.cloud.compute_v1beta.types.BulkInsertDiskResource" }, { "name": "retry", @@ -47854,21 +48158,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "bulk_insert" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_check_services_delete_sync.py", + "description": "Sample for BulkInsert", + "file": "compute_v1beta_generated_region_disks_bulk_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_BulkInsert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47878,43 +48182,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_delete_sync.py" + "title": "compute_v1beta_generated_region_disks_bulk_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.create_snapshot", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Get", + "fullName": "google.cloud.compute.v1beta.RegionDisks.CreateSnapshot", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Get" + "shortName": "CreateSnapshot" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.CreateSnapshotRegionDiskRequest" }, { "name": "project", @@ -47925,9 +48229,13 @@ "type": "str" }, { - "name": "health_check_service", + "name": "disk", "type": "str" }, + { + "name": "snapshot_resource", + "type": "google.cloud.compute_v1beta.types.Snapshot" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47941,14 +48249,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheckService", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "create_snapshot" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_check_services_get_sync.py", + "description": "Sample for CreateSnapshot", + "file": "compute_v1beta_generated_region_disks_create_snapshot_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Get_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_CreateSnapshot_sync", "segments": [ { "end": 53, @@ -47981,28 +48289,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_get_sync.py" + "title": "compute_v1beta_generated_region_disks_create_snapshot_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Insert", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionDiskRequest" }, { "name": "project", @@ -48013,8 +48321,8 @@ "type": "str" }, { - "name": "health_check_service_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheckService" + "name": "disk", + "type": "str" }, { "name": "retry", @@ -48030,21 +48338,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_check_services_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_disks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -48054,43 +48362,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_insert_sync.py" + "title": "compute_v1beta_generated_region_disks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.List", + "fullName": "google.cloud.compute.v1beta.RegionDisks.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "List" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthCheckServicesRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionDiskRequest" }, { "name": "project", @@ -48100,6 +48408,10 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48113,14 +48425,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_check_services.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_check_services_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_List_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -48138,43 +48450,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_list_sync.py" + "title": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Patch", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskRequest" }, { "name": "project", @@ -48185,13 +48497,9 @@ "type": "str" }, { - "name": "health_check_service", + "name": "disk", "type": "str" }, - { - "name": "health_check_service_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheckService" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48205,14 +48513,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.Disk", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_check_services_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_disks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Get_sync", "segments": [ { "end": 53, @@ -48245,28 +48553,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_patch_sync.py" + "title": "compute_v1beta_generated_region_disks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionDiskRequest" }, { "name": "project", @@ -48277,12 +48585,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "disk_resource", + "type": "google.cloud.compute_v1beta.types.Disk" }, { "name": "retry", @@ -48297,22 +48601,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_disks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -48322,43 +48626,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Delete", + "fullName": "google.cloud.compute.v1beta.RegionDisks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Delete" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionDisksRequest" }, { "name": "project", @@ -48368,10 +48672,6 @@ "name": "region", "type": "str" }, - { - "name": "health_check", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48385,14 +48685,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.services.region_disks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_checks_delete_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_disks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_List_sync", "segments": [ { "end": 53, @@ -48410,43 +48710,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_delete_sync.py" + "title": "compute_v1beta_generated_region_disks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.get", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.remove_resource_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Get", + "fullName": "google.cloud.compute.v1beta.RegionDisks.RemoveResourcePolicies", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Get" + "shortName": "RemoveResourcePolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.RemoveResourcePoliciesRegionDiskRequest" }, { "name": "project", @@ -48457,9 +48757,13 @@ "type": "str" }, { - "name": "health_check", + "name": "disk", "type": "str" }, + { + "name": "region_disks_remove_resource_policies_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48473,14 +48777,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheck", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_resource_policies" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_checks_get_sync.py", + "description": "Sample for RemoveResourcePolicies", + "file": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Get_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_RemoveResourcePolicies_sync", "segments": [ { "end": 53, @@ -48513,28 +48817,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_get_sync.py" + "title": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.resize", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Insert", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Resize", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Insert" + "shortName": "Resize" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.ResizeRegionDiskRequest" }, { "name": "project", @@ -48545,8 +48849,12 @@ "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "disk", + "type": "str" + }, + { + "name": "region_disks_resize_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksResizeRequest" }, { "name": "retry", @@ -48562,21 +48870,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "resize" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_checks_insert_sync.py", + "description": "Sample for Resize", + "file": "compute_v1beta_generated_region_disks_resize_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Resize_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -48586,43 +48894,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_insert_sync.py" + "title": "compute_v1beta_generated_region_disks_resize_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.list", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.List", + "fullName": "google.cloud.compute.v1beta.RegionDisks.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "List" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionDiskRequest" }, { "name": "project", @@ -48632,6 +48940,14 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48645,14 +48961,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_checks.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_checks_list_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_List_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -48670,43 +48986,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_list_sync.py" + "title": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Patch", + "fullName": "google.cloud.compute.v1beta.RegionDisks.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Patch" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionDiskRequest" }, { "name": "project", @@ -48717,12 +49033,12 @@ "type": "str" }, { - "name": "health_check", + "name": "resource", "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" }, { "name": "retry", @@ -48738,13 +49054,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "set_labels" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_checks_patch_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_disks_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_SetLabels_sync", "segments": [ { "end": 53, @@ -48777,28 +49093,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_patch_sync.py" + "title": "compute_v1beta_generated_region_disks_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.start_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StartAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "TestIamPermissions" + "shortName": "StartAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.StartAsyncReplicationRegionDiskRequest" }, { "name": "project", @@ -48809,12 +49125,12 @@ "type": "str" }, { - "name": "resource", + "name": "disk", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_disks_start_async_replication_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksStartAsyncReplicationRequest" }, { "name": "retry", @@ -48829,14 +49145,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "start_async_replication" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py", + "description": "Sample for StartAsyncReplication", + "file": "compute_v1beta_generated_region_disks_start_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StartAsyncReplication_sync", "segments": [ { "end": 53, @@ -48869,28 +49185,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disks_start_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.update", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Update", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StopAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Update" + "shortName": "StopAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.StopAsyncReplicationRegionDiskRequest" }, { "name": "project", @@ -48901,13 +49217,9 @@ "type": "str" }, { - "name": "health_check", + "name": "disk", "type": "str" }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48922,13 +49234,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "stop_async_replication" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_health_checks_update_sync.py", + "description": "Sample for StopAsyncReplication", + "file": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Update_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StopAsyncReplication_sync", "segments": [ { "end": 53, @@ -48961,33 +49273,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_update_sync.py" + "title": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_group_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StopGroupAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "AggregatedList" + "shortName": "StopGroupAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthSourcesRequest" + "type": "google.cloud.compute_v1beta.types.StopGroupAsyncReplicationRegionDiskRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "disks_stop_group_async_replication_resource_resource", + "type": "google.cloud.compute_v1beta.types.DisksStopGroupAsyncReplicationResource" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49001,14 +49321,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "stop_group_async_replication" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py", + "description": "Sample for StopGroupAsyncReplication", + "file": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StopGroupAsyncReplication_sync", "segments": [ { "end": 52, @@ -49026,43 +49346,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 49, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Delete", + "fullName": "google.cloud.compute.v1beta.RegionDisks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Delete" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionDiskRequest" }, { "name": "project", @@ -49073,9 +49393,13 @@ "type": "str" }, { - "name": "health_source", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49089,14 +49413,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_sources_delete_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -49129,28 +49453,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_delete_sync.py" + "title": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Get", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Get" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionDiskRequest" }, { "name": "project", @@ -49161,9 +49485,13 @@ "type": "str" }, { - "name": "health_source", + "name": "disk", "type": "str" }, + { + "name": "disk_resource", + "type": "google.cloud.compute_v1beta.types.Disk" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49177,14 +49505,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthSource", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_sources_get_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_disks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Get_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Update_sync", "segments": [ { "end": 53, @@ -49217,41 +49545,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_get_sync.py" + "title": "compute_v1beta_generated_region_disks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "Insert" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "health_source_resource", - "type": "google.cloud.compute_v1beta.types.HealthSource" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49265,14 +49585,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_sources_insert_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync", "segments": [ { "end": 52, @@ -49290,43 +49610,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_insert_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthSourcesRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49336,6 +49656,10 @@ "name": "region", "type": "str" }, + { + "name": "health_aggregation_policy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49349,14 +49673,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_sources_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync", "segments": [ { "end": 53, @@ -49374,43 +49698,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_list_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Patch", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49421,13 +49745,9 @@ "type": "str" }, { - "name": "health_source", + "name": "health_aggregation_policy", "type": "str" }, - { - "name": "health_source_resource", - "type": "google.cloud.compute_v1beta.types.HealthSource" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49441,14 +49761,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.HealthAggregationPolicy", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_sources_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_aggregation_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync", "segments": [ { "end": 53, @@ -49481,28 +49801,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_patch_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49513,12 +49833,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "health_aggregation_policy_resource", + "type": "google.cloud.compute_v1beta.types.HealthAggregationPolicy" }, { "name": "retry", @@ -49533,22 +49849,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -49558,43 +49874,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.cancel", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Cancel", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "Cancel" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CancelRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest" }, { "name": "project", @@ -49604,14 +49920,6 @@ "name": "region", "type": "str" }, - { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "resize_request", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49625,22 +49933,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "cancel" + "resultType": "google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Cancel", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_aggregation_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Cancel_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49650,43 +49958,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Delete", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49697,12 +50005,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_aggregation_policy", "type": "str" }, { - "name": "resize_request", - "type": "str" + "name": "health_aggregation_policy_resource", + "type": "google.cloud.compute_v1beta.types.HealthAggregationPolicy" }, { "name": "retry", @@ -49718,21 +50026,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49742,43 +50050,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Get", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49789,12 +50097,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, { - "name": "resize_request", - "type": "str" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -49809,22 +50117,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Get_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49834,43 +50142,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49881,13 +50189,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check_service", "type": "str" }, - { - "name": "instance_group_manager_resize_request_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49902,13 +50206,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_check_services_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Delete_sync", "segments": [ { "end": 53, @@ -49941,28 +50245,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagerResizeRequestsRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49973,7 +50277,7 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check_service", "type": "str" }, { @@ -49989,22 +50293,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_manager_resize_requests.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.HealthCheckService", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_check_services_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Get_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50024,33 +50328,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.abandon_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.AbandonInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "AbandonInstances" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AbandonInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckServiceRequest" }, { "name": "project", @@ -50061,12 +50365,8 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_abandon_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAbandonInstancesRequest" + "name": "health_check_service_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheckService" }, { "name": "retry", @@ -50082,21 +50382,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "abandon_instances" + "shortName": "insert" }, - "description": "Sample for AbandonInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_check_services_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_AbandonInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -50106,43 +50406,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.apply_updates_to_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ApplyUpdatesToInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "ApplyUpdatesToInstances" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthCheckServicesRequest" }, { "name": "project", @@ -50152,14 +50452,6 @@ "name": "region", "type": "str" }, - { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_apply_updates_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50173,14 +50465,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "apply_updates_to_instances" + "resultType": "google.cloud.compute_v1beta.services.region_health_check_services.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for ApplyUpdatesToInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_check_services_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_List_sync", "segments": [ { "end": 53, @@ -50198,43 +50490,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.create_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.CreateInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "CreateInstances" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CreateInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckServiceRequest" }, { "name": "project", @@ -50245,12 +50537,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check_service", "type": "str" }, { - "name": "region_instance_group_managers_create_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest" + "name": "health_check_service_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheckService" }, { "name": "retry", @@ -50266,13 +50558,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "create_instances" + "shortName": "patch" }, - "description": "Sample for CreateInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_check_services_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_CreateInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Patch_sync", "segments": [ { "end": 53, @@ -50305,28 +50597,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeleteInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "DeleteInstances" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckServiceRequest" }, { "name": "project", @@ -50337,12 +50629,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, { - "name": "region_instance_group_managers_delete_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -50357,14 +50649,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete_instances" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for DeleteInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeleteInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -50397,28 +50689,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeletePerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "DeletePerInstanceConfigs" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckRequest" }, { "name": "project", @@ -50429,13 +50721,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, - { - "name": "region_instance_group_manager_delete_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50450,13 +50738,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete_per_instance_configs" + "shortName": "delete" }, - "description": "Sample for DeletePerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Delete_sync", "segments": [ { "end": 53, @@ -50489,28 +50777,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_checks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Delete", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckRequest" }, { "name": "project", @@ -50521,7 +50809,7 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, { @@ -50537,14 +50825,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Get_sync", "segments": [ { "end": 53, @@ -50577,28 +50865,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py" + "title": "compute_v1beta_generated_region_health_checks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.get", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Get", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckRequest" }, { "name": "project", @@ -50609,8 +50897,8 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -50625,22 +50913,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_group_managers_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Get_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -50650,43 +50938,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_get_sync.py" + "title": "compute_v1beta_generated_region_health_checks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "Insert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthChecksRequest" }, { "name": "project", @@ -50696,10 +50984,6 @@ "name": "region", "type": "str" }, - { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50713,22 +50997,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_health_checks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50748,33 +51032,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py" + "title": "compute_v1beta_generated_region_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_errors", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListErrors", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "ListErrors" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListErrorsRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckRequest" }, { "name": "project", @@ -50785,9 +51069,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, + { + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50801,22 +51089,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListErrorsPager", - "shortName": "list_errors" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for ListErrors", - "file": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListErrors_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Patch_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50836,33 +51124,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py" + "title": "compute_v1beta_generated_region_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_managed_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListManagedInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "ListManagedInstances" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListManagedInstancesRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckRequest" }, { "name": "project", @@ -50873,9 +51161,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50889,22 +51181,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListManagedInstancesPager", - "shortName": "list_managed_instances" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for ListManagedInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListManagedInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_TestIamPermissions_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50924,33 +51216,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py" + "title": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListPerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "ListPerInstanceConfigs" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListPerInstanceConfigsRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionHealthCheckRequest" }, { "name": "project", @@ -50961,9 +51253,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, + { + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50977,22 +51273,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPerInstanceConfigsPager", - "shortName": "list_per_instance_configs" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for ListPerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_health_checks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Update_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -51012,42 +51308,38 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_checks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "List" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthSourcesRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -51061,22 +51353,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_group_managers_list_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_AggregatedList_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -51086,43 +51378,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 50, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_sync.py" + "title": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.PatchPerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "PatchPerInstanceConfigs" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthSourceRequest" }, { "name": "project", @@ -51133,13 +51425,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, - { - "name": "region_instance_group_manager_patch_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerPatchInstanceConfigReq" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -51154,13 +51442,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_per_instance_configs" + "shortName": "delete" }, - "description": "Sample for PatchPerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_sources_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Delete_sync", "segments": [ { "end": 53, @@ -51193,28 +51481,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_sources_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Patch", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthSourceRequest" }, { "name": "project", @@ -51225,13 +51513,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, - { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -51245,14 +51529,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.HealthSource", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_sources_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Get_sync", "segments": [ { "end": 53, @@ -51285,28 +51569,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py" + "title": "compute_v1beta_generated_region_health_sources_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.recreate_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.RecreateInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "RecreateInstances" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RecreateInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthSourceRequest" }, { "name": "project", @@ -51317,12 +51601,8 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_recreate_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest" + "name": "health_source_resource", + "type": "google.cloud.compute_v1beta.types.HealthSource" }, { "name": "retry", @@ -51338,21 +51618,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "recreate_instances" + "shortName": "insert" }, - "description": "Sample for RecreateInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_sources_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_RecreateInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -51362,43 +51642,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py" + "title": "compute_v1beta_generated_region_health_sources_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize_advanced", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResizeAdvanced", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "ResizeAdvanced" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeAdvancedRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthSourcesRequest" }, { "name": "project", @@ -51408,14 +51688,6 @@ "name": "region", "type": "str" }, - { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_resize_advanced_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -51429,14 +51701,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize_advanced" + "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for ResizeAdvanced", - "file": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_sources_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResizeAdvanced_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_List_sync", "segments": [ { "end": 53, @@ -51454,43 +51726,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py" + "title": "compute_v1beta_generated_region_health_sources_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Resize", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "Resize" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthSourceRequest" }, { "name": "project", @@ -51501,12 +51773,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, { - "name": "size", - "type": "int" + "name": "health_source_resource", + "type": "google.cloud.compute_v1beta.types.HealthSource" }, { "name": "retry", @@ -51522,21 +51794,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize" + "shortName": "patch" }, - "description": "Sample for Resize", - "file": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_sources_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Resize_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Patch_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -51546,43 +51818,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py" + "title": "compute_v1beta_generated_region_health_sources_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resume_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResumeInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "ResumeInstances" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResumeInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthSourceRequest" }, { "name": "project", @@ -51593,12 +51865,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, { - "name": "region_instance_group_managers_resume_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -51613,14 +51885,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resume_instances" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for ResumeInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResumeInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -51653,28 +51925,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py" + "title": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_auto_healing_policies", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.cancel", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetAutoHealingPolicies", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Cancel", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "SetAutoHealingPolicies" + "shortName": "Cancel" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.CancelRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51689,8 +51961,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_set_auto_healing_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetAutoHealingRequest" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51706,21 +51978,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_auto_healing_policies" + "shortName": "cancel" }, - "description": "Sample for SetAutoHealingPolicies", - "file": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py", + "description": "Sample for Cancel", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetAutoHealingPolicies_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Cancel_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51730,43 +52002,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_instance_template", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetInstanceTemplate", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "SetInstanceTemplate" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetInstanceTemplateRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51781,8 +52053,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_set_template_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTemplateRequest" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51798,21 +52070,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_instance_template" + "shortName": "delete" }, - "description": "Sample for SetInstanceTemplate", - "file": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Delete_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51822,43 +52094,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_target_pools", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetTargetPools", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "SetTargetPools" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetTargetPoolsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51873,8 +52145,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_set_target_pools_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTargetPoolsRequest" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51889,22 +52161,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_target_pools" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest", + "shortName": "get" }, - "description": "Sample for SetTargetPools", - "file": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetTargetPools_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Get_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51914,43 +52186,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.start_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StartInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "StartInstances" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StartInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51965,8 +52237,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_start_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStartInstancesRequest" + "name": "instance_group_manager_resize_request_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest" }, { "name": "retry", @@ -51982,13 +52254,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "start_instances" + "shortName": "insert" }, - "description": "Sample for StartInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StartInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Insert_sync", "segments": [ { "end": 53, @@ -52021,28 +52293,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.stop_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StopInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "StopInstances" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagerResizeRequestsRequest" }, { "name": "project", @@ -52056,10 +52328,6 @@ "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_group_managers_stop_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStopInstancesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52073,22 +52341,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_instances" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_manager_resize_requests.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for StopInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StopInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_List_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -52108,12 +52376,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py" }, { "canonical": true, @@ -52122,19 +52390,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.suspend_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.abandon_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SuspendInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.AbandonInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SuspendInstances" + "shortName": "AbandonInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SuspendInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.AbandonInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52149,8 +52417,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_suspend_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSuspendInstancesRequest" + "name": "region_instance_group_managers_abandon_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAbandonInstancesRequest" }, { "name": "retry", @@ -52166,13 +52434,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "suspend_instances" + "shortName": "abandon_instances" }, - "description": "Sample for SuspendInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py", + "description": "Sample for AbandonInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SuspendInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_AbandonInstances_sync", "segments": [ { "end": 53, @@ -52205,7 +52473,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py" }, { "canonical": true, @@ -52214,19 +52482,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.apply_updates_to_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ApplyUpdatesToInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "TestIamPermissions" + "shortName": "ApplyUpdatesToInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52237,12 +52505,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_instance_group_managers_apply_updates_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest" }, { "name": "retry", @@ -52257,14 +52525,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "apply_updates_to_instances" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py", + "description": "Sample for ApplyUpdatesToInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync", "segments": [ { "end": 53, @@ -52297,7 +52565,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py" }, { "canonical": true, @@ -52306,19 +52574,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.create_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.UpdatePerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.CreateInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "UpdatePerInstanceConfigs" + "shortName": "CreateInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.CreateInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52333,8 +52601,8 @@ "type": "str" }, { - "name": "region_instance_group_manager_update_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerUpdateInstanceConfigReq" + "name": "region_instance_group_managers_create_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest" }, { "name": "retry", @@ -52350,13 +52618,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update_per_instance_configs" + "shortName": "create_instances" }, - "description": "Sample for UpdatePerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py", + "description": "Sample for CreateInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_CreateInstances_sync", "segments": [ { "end": 53, @@ -52389,7 +52657,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py" }, { "canonical": true, @@ -52398,19 +52666,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Update", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeleteInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Update" + "shortName": "DeleteInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52425,8 +52693,8 @@ "type": "str" }, { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" + "name": "region_instance_group_managers_delete_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest" }, { "name": "retry", @@ -52442,13 +52710,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "delete_instances" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_instance_group_managers_update_sync.py", + "description": "Sample for DeleteInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Update_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeleteInstances_sync", "segments": [ { "end": 53, @@ -52481,28 +52749,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_update_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeletePerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "DeletePerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52513,9 +52781,13 @@ "type": "str" }, { - "name": "instance_group", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_manager_delete_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52529,14 +52801,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroup", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete_per_instance_configs" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_groups_get_sync.py", + "description": "Sample for DeletePerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync", "segments": [ { "end": 53, @@ -52569,28 +52841,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.ListInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "ListInstances" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListInstancesRegionInstanceGroupsRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52601,13 +52873,9 @@ "type": "str" }, { - "name": "instance_group", + "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_groups_list_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52621,22 +52889,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListInstancesPager", - "shortName": "list_instances" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for ListInstances", - "file": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_ListInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Delete_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -52655,118 +52923,34 @@ "start": 48, "type": "REQUEST_EXECUTION" }, - { - "end": 55, - "start": 51, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.List", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" - }, - "shortName": "List" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupsRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "region", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListPager", - "shortName": "list" - }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_groups_list_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_List_sync", - "segments": [ - { - "end": 53, - "start": 27, - "type": "FULL" - }, - { - "end": 53, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.set_named_ports", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.SetNamedPorts", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetNamedPorts" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetNamedPortsRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52777,13 +52961,9 @@ "type": "str" }, { - "name": "instance_group", + "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_groups_set_named_ports_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsSetNamedPortsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52797,14 +52977,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_named_ports" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", + "shortName": "get" }, - "description": "Sample for SetNamedPorts", - "file": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_group_managers_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_SetNamedPorts_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Get_sync", "segments": [ { "end": 53, @@ -52837,28 +53017,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52869,12 +53049,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" }, { "name": "retry", @@ -52889,22 +53065,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -52914,43 +53090,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_errors", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListErrors", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "ListErrors" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.ListErrorsRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -52961,7 +53137,7 @@ "type": "str" }, { - "name": "instance_template", + "name": "instance_group_manager", "type": "str" }, { @@ -52977,22 +53153,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListErrorsPager", + "shortName": "list_errors" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_templates_delete_sync.py", + "description": "Sample for ListErrors", + "file": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListErrors_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -53012,33 +53188,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_managed_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListManagedInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "ListManagedInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.ListManagedInstancesRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -53049,7 +53225,7 @@ "type": "str" }, { - "name": "instance_template", + "name": "instance_group_manager", "type": "str" }, { @@ -53065,22 +53241,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceTemplate", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListManagedInstancesPager", + "shortName": "list_managed_instances" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_templates_get_sync.py", + "description": "Sample for ListManagedInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListManagedInstances_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -53100,33 +53276,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListPerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Insert" + "shortName": "ListPerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.ListPerInstanceConfigsRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -53137,8 +53313,8 @@ "type": "str" }, { - "name": "instance_template_resource", - "type": "google.cloud.compute_v1beta.types.InstanceTemplate" + "name": "instance_group_manager", + "type": "str" }, { "name": "retry", @@ -53153,22 +53329,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPerInstanceConfigsPager", + "shortName": "list_per_instance_configs" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_templates_insert_sync.py", + "description": "Sample for ListPerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync", "segments": [ { - "end": 52, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 54, "start": 27, "type": "SHORT" }, @@ -53178,43 +53354,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 55, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceTemplatesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -53237,14 +53413,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_templates.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_templates_list_sync.py", + "file": "compute_v1beta_generated_region_instance_group_managers_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_List_sync", "segments": [ { "end": 53, @@ -53277,28 +53453,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstancesClient", - "shortName": "RegionInstancesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstancesClient.bulk_insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstances.BulkInsert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.PatchPerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstances", - "shortName": "RegionInstances" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "BulkInsert" + "shortName": "PatchPerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.BulkInsertRegionInstanceRequest" + "type": "google.cloud.compute_v1beta.types.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53309,8 +53485,12 @@ "type": "str" }, { - "name": "bulk_insert_instance_resource_resource", - "type": "google.cloud.compute_v1beta.types.BulkInsertInstanceResource" + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_manager_patch_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerPatchInstanceConfigReq" }, { "name": "retry", @@ -53326,21 +53506,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "bulk_insert" + "shortName": "patch_per_instance_configs" }, - "description": "Sample for BulkInsert", - "file": "compute_v1beta_generated_region_instances_bulk_insert_sync.py", + "description": "Sample for PatchPerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstances_BulkInsert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -53350,43 +53530,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instances_bulk_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53397,9 +53577,13 @@ "type": "str" }, { - "name": "instant_snapshot", + "name": "instance_group_manager", "type": "str" }, + { + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53414,13 +53598,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Patch_sync", "segments": [ { "end": 53, @@ -53453,28 +53637,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.recreate_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.RecreateInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "GetIamPolicy" + "shortName": "RecreateInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.RecreateInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53485,9 +53669,13 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_recreate_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53501,14 +53689,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "recreate_instances" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py", + "description": "Sample for RecreateInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_RecreateInstances_sync", "segments": [ { "end": 53, @@ -53541,28 +53729,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize_advanced", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResizeAdvanced", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "ResizeAdvanced" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.ResizeAdvancedRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53573,9 +53761,13 @@ "type": "str" }, { - "name": "instant_snapshot", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_resize_advanced_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53589,14 +53781,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstantSnapshot", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "resize_advanced" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instant_snapshots_get_sync.py", + "description": "Sample for ResizeAdvanced", + "file": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResizeAdvanced_sync", "segments": [ { "end": 53, @@ -53629,28 +53821,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Resize", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Insert" + "shortName": "Resize" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.ResizeRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53661,8 +53853,12 @@ "type": "str" }, { - "name": "instant_snapshot_resource", - "type": "google.cloud.compute_v1beta.types.InstantSnapshot" + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "size", + "type": "int" }, { "name": "retry", @@ -53678,21 +53874,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "resize" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py", + "description": "Sample for Resize", + "file": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Resize_sync", "segments": [ { - "end": 52, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 54, "start": 27, "type": "SHORT" }, @@ -53702,43 +53898,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resume_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResumeInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "List" + "shortName": "ResumeInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstantSnapshotsRequest" + "type": "google.cloud.compute_v1beta.types.ResumeInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53748,6 +53944,14 @@ "name": "region", "type": "str" }, + { + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_managers_resume_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53761,14 +53965,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instant_snapshots.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "resume_instances" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instant_snapshots_list_sync.py", + "description": "Sample for ResumeInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResumeInstances_sync", "segments": [ { "end": 53, @@ -53786,43 +53990,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_auto_healing_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetAutoHealingPolicies", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetIamPolicy" + "shortName": "SetAutoHealingPolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53833,12 +54037,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + "name": "region_instance_group_managers_set_auto_healing_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetAutoHealingRequest" }, { "name": "retry", @@ -53853,14 +54057,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_auto_healing_policies" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py", + "description": "Sample for SetAutoHealingPolicies", + "file": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetAutoHealingPolicies_sync", "segments": [ { "end": 53, @@ -53893,28 +54097,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_instance_template", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetInstanceTemplate", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetLabels" + "shortName": "SetInstanceTemplate" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetInstanceTemplateRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53925,12 +54129,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "region_instance_group_managers_set_template_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTemplateRequest" }, { "name": "retry", @@ -53946,13 +54150,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "set_instance_template" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py", + "description": "Sample for SetInstanceTemplate", + "file": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync", "segments": [ { "end": 53, @@ -53985,28 +54189,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_target_pools", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetTargetPools", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "TestIamPermissions" + "shortName": "SetTargetPools" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetTargetPoolsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54017,12 +54221,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_instance_group_managers_set_target_pools_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTargetPoolsRequest" }, { "name": "retry", @@ -54037,14 +54241,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_target_pools" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py", + "description": "Sample for SetTargetPools", + "file": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetTargetPools_sync", "segments": [ { "end": 53, @@ -54077,28 +54281,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.start_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StartInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "StartInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.StartInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54109,9 +54313,13 @@ "type": "str" }, { - "name": "multi_mig", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_start_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStartInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54126,13 +54334,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "start_instances" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_multi_migs_delete_sync.py", + "description": "Sample for StartInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StartInstances_sync", "segments": [ { "end": 53, @@ -54165,28 +54373,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.stop_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StopInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "StopInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.StopInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54197,9 +54405,13 @@ "type": "str" }, { - "name": "multi_mig", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_stop_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStopInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54213,14 +54425,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.MultiMig", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "stop_instances" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_multi_migs_get_sync.py", + "description": "Sample for StopInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StopInstances_sync", "segments": [ { "end": 53, @@ -54253,28 +54465,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.suspend_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SuspendInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Insert" + "shortName": "SuspendInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.SuspendInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54285,92 +54497,12 @@ "type": "str" }, { - "name": "multi_mig_resource", - "type": "google.cloud.compute_v1beta.types.MultiMig" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" - }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_multi_migs_insert_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Insert_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_multi_migs_insert_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.list", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.List", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" - }, - "shortName": "List" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionMultiMigsRequest" - }, - { - "name": "project", + "name": "instance_group_manager", "type": "str" }, { - "name": "region", - "type": "str" + "name": "region_instance_group_managers_suspend_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSuspendInstancesRequest" }, { "name": "retry", @@ -54385,14 +54517,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_multi_migs.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "suspend_instances" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_multi_migs_list_sync.py", + "description": "Sample for SuspendInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SuspendInstances_sync", "segments": [ { "end": 53, @@ -54410,43 +54542,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.attach_network_endpoints", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.AttachNetworkEndpoints", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "AttachNetworkEndpoints" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54457,12 +54589,12 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "resource", "type": "str" }, { - "name": "region_network_endpoint_groups_attach_endpoints_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -54477,14 +54609,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "attach_network_endpoints" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for AttachNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_AttachNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -54517,28 +54649,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.UpdatePerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "UpdatePerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54549,9 +54681,13 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_manager_update_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerUpdateInstanceConfigReq" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54566,13 +54702,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "update_per_instance_configs" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py", + "description": "Sample for UpdatePerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync", "segments": [ { "end": 53, @@ -54605,28 +54741,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.detach_network_endpoints", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.DetachNetworkEndpoints", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "DetachNetworkEndpoints" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54637,12 +54773,12 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "instance_group_manager", "type": "str" }, { - "name": "region_network_endpoint_groups_detach_endpoints_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest" + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" }, { "name": "retry", @@ -54658,13 +54794,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "detach_network_endpoints" + "shortName": "update" }, - "description": "Sample for DetachNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_instance_group_managers_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_DetachNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Update_sync", "segments": [ { "end": 53, @@ -54697,28 +54833,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupRequest" }, { "name": "project", @@ -54729,7 +54865,7 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "instance_group", "type": "str" }, { @@ -54745,14 +54881,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkEndpointGroup", + "resultType": "google.cloud.compute_v1beta.types.InstanceGroup", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py", + "file": "compute_v1beta_generated_region_instance_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_Get_sync", "segments": [ { "end": 53, @@ -54785,28 +54921,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.ListInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "Insert" + "shortName": "ListInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.ListInstancesRegionInstanceGroupsRequest" }, { "name": "project", @@ -54817,96 +54953,12 @@ "type": "str" }, { - "name": "network_endpoint_group_resource", - "type": "google.cloud.compute_v1beta.types.NetworkEndpointGroup" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" - }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Insert_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list_network_endpoints", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.ListNetworkEndpoints", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" - }, - "shortName": "ListNetworkEndpoints" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "region", + "name": "instance_group", "type": "str" }, { - "name": "network_endpoint_group", - "type": "str" + "name": "region_instance_groups_list_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest" }, { "name": "retry", @@ -54921,14 +54973,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListNetworkEndpointsPager", - "shortName": "list_network_endpoints" + "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListInstancesPager", + "shortName": "list_instances" }, - "description": "Sample for ListNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py", + "description": "Sample for ListInstances", + "file": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_ListNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_ListInstances_sync", "segments": [ { "end": 54, @@ -54961,28 +55013,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkEndpointGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupsRequest" }, { "name": "project", @@ -55005,14 +55057,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py", + "file": "compute_v1beta_generated_region_instance_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_List_sync", "segments": [ { "end": 53, @@ -55045,28 +55097,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_association", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.set_named_ports", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddAssociation", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.SetNamedPorts", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "AddAssociation" + "shortName": "SetNamedPorts" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetNamedPortsRegionInstanceGroupRequest" }, { "name": "project", @@ -55077,12 +55129,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instance_group", "type": "str" }, { - "name": "firewall_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + "name": "region_instance_groups_set_named_ports_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsSetNamedPortsRequest" }, { "name": "retry", @@ -55098,13 +55150,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_association" + "shortName": "set_named_ports" }, - "description": "Sample for AddAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py", + "description": "Sample for SetNamedPorts", + "file": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_SetNamedPorts_sync", "segments": [ { "end": 53, @@ -55137,28 +55189,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_rule", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddRule", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "AddRule" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupRequest" }, { "name": "project", @@ -55169,12 +55221,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { - "name": "firewall_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -55189,14 +55241,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_rule" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for AddRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddRule_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -55229,28 +55281,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.clone_rules", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.CloneRules", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "CloneRules" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CloneRulesRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceTemplateRequest" }, { "name": "project", @@ -55261,7 +55313,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instance_template", "type": "str" }, { @@ -55278,13 +55330,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "clone_rules" + "shortName": "delete" }, - "description": "Sample for CloneRules", - "file": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_templates_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_CloneRules_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Delete_sync", "segments": [ { "end": 53, @@ -55317,28 +55369,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceTemplateRequest" }, { "name": "project", @@ -55349,7 +55401,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instance_template", "type": "str" }, { @@ -55365,14 +55417,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.InstanceTemplate", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_templates_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Get_sync", "segments": [ { "end": 53, @@ -55405,28 +55457,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_association", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetAssociation", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "GetAssociation" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceTemplateRequest" }, { "name": "project", @@ -55437,7 +55489,91 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instance_template_resource", + "type": "google.cloud.compute_v1beta.types.InstanceTemplate" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_templates_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_instance_templates_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceTemplatesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", "type": "str" }, { @@ -55453,14 +55589,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation", - "shortName": "get_association" + "resultType": "google.cloud.compute_v1beta.services.region_instance_templates.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for GetAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instance_templates_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_List_sync", "segments": [ { "end": 53, @@ -55478,43 +55614,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstancesClient", + "shortName": "RegionInstancesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_effective_firewalls", + "fullName": "google.cloud.compute_v1beta.RegionInstancesClient.bulk_insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetEffectiveFirewalls", + "fullName": "google.cloud.compute.v1beta.RegionInstances.BulkInsert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstances", + "shortName": "RegionInstances" }, - "shortName": "GetEffectiveFirewalls" + "shortName": "BulkInsert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.BulkInsertRegionInstanceRequest" }, { "name": "project", @@ -55525,8 +55661,8 @@ "type": "str" }, { - "name": "network", - "type": "str" + "name": "bulk_insert_instance_resource_resource", + "type": "google.cloud.compute_v1beta.types.BulkInsertInstanceResource" }, { "name": "retry", @@ -55541,22 +55677,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", - "shortName": "get_effective_firewalls" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "bulk_insert" }, - "description": "Sample for GetEffectiveFirewalls", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py", + "description": "Sample for BulkInsert", + "file": "compute_v1beta_generated_region_instances_bulk_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync", + "regionTag": "compute_v1beta_generated_RegionInstances_BulkInsert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -55566,43 +55702,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py" + "title": "compute_v1beta_generated_region_instances_bulk_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetIamPolicy" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstantSnapshotRequest" }, { "name": "project", @@ -55613,7 +55749,7 @@ "type": "str" }, { - "name": "resource", + "name": "instant_snapshot", "type": "str" }, { @@ -55629,14 +55765,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Delete_sync", "segments": [ { "end": 53, @@ -55669,28 +55805,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_rule", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetRule", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetRule" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionInstantSnapshotRequest" }, { "name": "project", @@ -55701,7 +55837,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { @@ -55717,14 +55853,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyRule", - "shortName": "get_rule" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for GetRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetRule_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -55757,28 +55893,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstantSnapshotRequest" }, { "name": "project", @@ -55789,7 +55925,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instant_snapshot", "type": "str" }, { @@ -55805,14 +55941,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicy", + "resultType": "google.cloud.compute_v1beta.types.InstantSnapshot", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py", + "file": "compute_v1beta_generated_region_instant_snapshots_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Get_sync", "segments": [ { "end": 53, @@ -55845,28 +55981,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstantSnapshotRequest" }, { "name": "project", @@ -55877,8 +56013,8 @@ "type": "str" }, { - "name": "firewall_policy_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicy" + "name": "instant_snapshot_resource", + "type": "google.cloud.compute_v1beta.types.InstantSnapshot" }, { "name": "retry", @@ -55897,10 +56033,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py", + "file": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Insert_sync", "segments": [ { "end": 52, @@ -55933,28 +56069,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkFirewallPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstantSnapshotsRequest" }, { "name": "project", @@ -55977,14 +56113,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_firewall_policies.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_instant_snapshots.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py", + "file": "compute_v1beta_generated_region_instant_snapshots_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_List_sync", "segments": [ { "end": 53, @@ -56017,28 +56153,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_association", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchAssociation", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "PatchAssociation" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionInstantSnapshotRequest" }, { "name": "project", @@ -56049,12 +56185,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { - "name": "firewall_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -56069,14 +56205,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_association" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for PatchAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -56109,28 +56245,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_rule", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchRule", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "PatchRule" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionInstantSnapshotRequest" }, { "name": "project", @@ -56141,12 +56277,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { - "name": "firewall_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" }, { "name": "retry", @@ -56162,13 +56298,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_rule" + "shortName": "set_labels" }, - "description": "Sample for PatchRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchRule_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetLabels_sync", "segments": [ { "end": 53, @@ -56201,28 +56337,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "Patch" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstantSnapshotRequest" }, { "name": "project", @@ -56233,12 +56369,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { - "name": "firewall_policy_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicy" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -56253,14 +56389,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -56293,28 +56429,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_association", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveAssociation", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "RemoveAssociation" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionMultiMigRequest" }, { "name": "project", @@ -56325,7 +56461,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "multi_mig", "type": "str" }, { @@ -56342,13 +56478,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_association" + "shortName": "delete" }, - "description": "Sample for RemoveAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_multi_migs_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Delete_sync", "segments": [ { "end": 53, @@ -56381,28 +56517,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_rule", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveRule", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "RemoveRule" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionMultiMigRequest" }, { "name": "project", @@ -56413,7 +56549,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "multi_mig", "type": "str" }, { @@ -56429,14 +56565,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_rule" + "resultType": "google.cloud.compute_v1beta.types.MultiMig", + "shortName": "get" }, - "description": "Sample for RemoveRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_multi_migs_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveRule_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Get_sync", "segments": [ { "end": 53, @@ -56469,28 +56605,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "SetIamPolicy" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionMultiMigRequest" }, { "name": "project", @@ -56501,12 +56637,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + "name": "multi_mig_resource", + "type": "google.cloud.compute_v1beta.types.MultiMig" }, { "name": "retry", @@ -56521,22 +56653,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_multi_migs_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -56546,43 +56678,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionMultiMigsRequest" }, { "name": "project", @@ -56592,14 +56724,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56613,14 +56737,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.region_multi_migs.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_multi_migs_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_List_sync", "segments": [ { "end": 53, @@ -56638,43 +56762,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.attach_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.AttachNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "AddAssociation" + "shortName": "AttachNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56685,12 +56809,12 @@ "type": "str" }, { - "name": "network_policy", + "name": "network_endpoint_group", "type": "str" }, { - "name": "network_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation" + "name": "region_network_endpoint_groups_attach_endpoints_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest" }, { "name": "retry", @@ -56706,13 +56830,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_association" + "shortName": "attach_network_endpoints" }, - "description": "Sample for AddAssociation", - "file": "compute_v1beta_generated_region_network_policies_add_association_sync.py", + "description": "Sample for AttachNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_AttachNetworkEndpoints_sync", "segments": [ { "end": 53, @@ -56745,28 +56869,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_add_association_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "AddTrafficClassificationRule" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56777,13 +56901,9 @@ "type": "str" }, { - "name": "network_policy", + "name": "network_endpoint_group", "type": "str" }, - { - "name": "network_policy_traffic_classification_rule_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56798,13 +56918,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_traffic_classification_rule" + "shortName": "delete" }, - "description": "Sample for AddTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Delete_sync", "segments": [ { "end": 53, @@ -56837,33 +56957,45 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.detach_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.DetachNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "AggregatedList" + "shortName": "DetachNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionNetworkPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "network_endpoint_group", + "type": "str" + }, + { + "name": "region_network_endpoint_groups_detach_endpoints_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56877,22 +57009,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "detach_network_endpoints" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py", + "description": "Sample for DetachNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_DetachNetworkEndpoints_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -56902,43 +57034,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56949,7 +57081,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "network_endpoint_group", "type": "str" }, { @@ -56965,14 +57097,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.NetworkEndpointGroup", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_policies_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Get_sync", "segments": [ { "end": 53, @@ -57005,28 +57137,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "GetAssociation" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -57037,8 +57169,8 @@ "type": "str" }, { - "name": "network_policy", - "type": "str" + "name": "network_endpoint_group_resource", + "type": "google.cloud.compute_v1beta.types.NetworkEndpointGroup" }, { "name": "retry", @@ -57053,22 +57185,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation", - "shortName": "get_association" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for GetAssociation", - "file": "compute_v1beta_generated_region_network_policies_get_association_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -57078,43 +57210,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_association_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.ListNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "GetTrafficClassificationRule" + "shortName": "ListNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest" }, { "name": "project", @@ -57125,7 +57257,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "network_endpoint_group", "type": "str" }, { @@ -57141,22 +57273,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule", - "shortName": "get_traffic_classification_rule" + "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListNetworkEndpointsPager", + "shortName": "list_network_endpoints" }, - "description": "Sample for GetTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py", + "description": "Sample for ListNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_ListNetworkEndpoints_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -57176,33 +57308,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "Get" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkEndpointGroupsRequest" }, { "name": "project", @@ -57212,10 +57344,6 @@ "name": "region", "type": "str" }, - { - "name": "network_policy", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57229,14 +57357,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicy", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_policies_get_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_List_sync", "segments": [ { "end": 53, @@ -57254,43 +57382,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Insert" + "shortName": "AddAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57301,8 +57429,12 @@ "type": "str" }, { - "name": "network_policy_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicy" + "name": "firewall_policy", + "type": "str" + }, + { + "name": "firewall_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" }, { "name": "retry", @@ -57318,21 +57450,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "add_association" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_policies_insert_sync.py", + "description": "Sample for AddAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddAssociation_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -57342,43 +57474,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "List" + "shortName": "AddRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.AddRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57388,6 +57520,14 @@ "name": "region", "type": "str" }, + { + "name": "firewall_policy", + "type": "str" + }, + { + "name": "firewall_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57401,14 +57541,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_rule" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_policies_list_sync.py", + "description": "Sample for AddRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddRule_sync", "segments": [ { "end": 53, @@ -57426,43 +57566,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.clone_rules", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.PatchTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.CloneRules", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "PatchTrafficClassificationRule" + "shortName": "CloneRules" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.CloneRulesRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57473,13 +57613,9 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, - { - "name": "network_policy_traffic_classification_rule_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57494,13 +57630,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_traffic_classification_rule" + "shortName": "clone_rules" }, - "description": "Sample for PatchTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py", + "description": "Sample for CloneRules", + "file": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_PatchTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_CloneRules_sync", "segments": [ { "end": 53, @@ -57533,28 +57669,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Patch" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57565,12 +57701,96 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, { - "name": "network_policy_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicy" + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_association", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetAssociation", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" + }, + "shortName": "GetAssociation" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkFirewallPolicyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "firewall_policy", + "type": "str" }, { "name": "retry", @@ -57585,14 +57805,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation", + "shortName": "get_association" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_network_policies_patch_sync.py", + "description": "Sample for GetAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetAssociation_sync", "segments": [ { "end": 53, @@ -57625,28 +57845,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_effective_firewalls", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetEffectiveFirewalls", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "RemoveAssociation" + "shortName": "GetEffectiveFirewalls" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57657,7 +57877,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "network", "type": "str" }, { @@ -57673,14 +57893,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_association" + "resultType": "google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", + "shortName": "get_effective_firewalls" }, - "description": "Sample for RemoveAssociation", - "file": "compute_v1beta_generated_region_network_policies_remove_association_sync.py", + "description": "Sample for GetEffectiveFirewalls", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync", "segments": [ { "end": 53, @@ -57713,28 +57933,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_remove_association_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "RemoveTrafficClassificationRule" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57745,7 +57965,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "resource", "type": "str" }, { @@ -57761,14 +57981,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_traffic_classification_rule" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for RemoveTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -57801,28 +58021,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "GetRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.GetRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57833,7 +58053,7 @@ "type": "str" }, { - "name": "notification_endpoint", + "name": "firewall_policy", "type": "str" }, { @@ -57849,14 +58069,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyRule", + "shortName": "get_rule" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py", + "description": "Sample for GetRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetRule_sync", "segments": [ { "end": 53, @@ -57889,28 +58109,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57921,7 +58141,7 @@ "type": "str" }, { - "name": "notification_endpoint", + "name": "firewall_policy", "type": "str" }, { @@ -57937,14 +58157,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NotificationEndpoint", + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_notification_endpoints_get_sync.py", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Get_sync", "segments": [ { "end": 53, @@ -57977,28 +58197,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_get_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58009,8 +58229,8 @@ "type": "str" }, { - "name": "notification_endpoint_resource", - "type": "google.cloud.compute_v1beta.types.NotificationEndpoint" + "name": "firewall_policy_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicy" }, { "name": "retry", @@ -58029,10 +58249,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py", + "file": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Insert_sync", "segments": [ { "end": 52, @@ -58065,28 +58285,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNotificationEndpointsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkFirewallPoliciesRequest" }, { "name": "project", @@ -58109,14 +58329,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_notification_endpoints.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_network_firewall_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_notification_endpoints_list_sync.py", + "file": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_List_sync", "segments": [ { "end": 53, @@ -58149,28 +58369,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "PatchAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.PatchAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58181,12 +58401,12 @@ "type": "str" }, { - "name": "resource", + "name": "firewall_policy", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "firewall_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" }, { "name": "retry", @@ -58201,14 +58421,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch_association" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py", + "description": "Sample for PatchAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchAssociation_sync", "segments": [ { "end": 53, @@ -58241,28 +58461,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "PatchRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.PatchRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58273,9 +58493,13 @@ "type": "str" }, { - "name": "operation", + "name": "firewall_policy", "type": "str" }, + { + "name": "firewall_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58289,14 +58513,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DeleteRegionOperationResponse", - "shortName": "delete" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch_rule" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_operations_delete_sync.py", + "description": "Sample for PatchRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchRule_sync", "segments": [ { "end": 53, @@ -58329,28 +58553,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Get" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58361,9 +58585,13 @@ "type": "str" }, { - "name": "operation", + "name": "firewall_policy", "type": "str" }, + { + "name": "firewall_policy_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58377,14 +58605,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_operations_get_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Patch_sync", "segments": [ { "end": 53, @@ -58417,28 +58645,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_get_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "List" + "shortName": "RemoveAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionOperationsRequest" + "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58448,6 +58676,10 @@ "name": "region", "type": "str" }, + { + "name": "firewall_policy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58461,14 +58693,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_operations.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_association" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_operations_list_sync.py", + "description": "Sample for RemoveAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync", "segments": [ { "end": 53, @@ -58486,43 +58718,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.wait", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Wait", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Wait" + "shortName": "RemoveRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.WaitRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58533,7 +58765,7 @@ "type": "str" }, { - "name": "operation", + "name": "firewall_policy", "type": "str" }, { @@ -58549,14 +58781,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "wait" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_rule" }, - "description": "Sample for Wait", - "file": "compute_v1beta_generated_region_operations_wait_sync.py", + "description": "Sample for RemoveRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Wait_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveRule_sync", "segments": [ { "end": 53, @@ -58589,28 +58821,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_wait_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.add_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.AddRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "AddRule" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58621,12 +58853,12 @@ "type": "str" }, { - "name": "security_policy", + "name": "resource", "type": "str" }, { - "name": "security_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -58641,14 +58873,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_rule" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for AddRule", - "file": "compute_v1beta_generated_region_security_policies_add_rule_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_AddRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -58681,28 +58913,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_add_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58713,9 +58945,13 @@ "type": "str" }, { - "name": "security_policy", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58729,14 +58965,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_security_policies_delete_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -58769,28 +59005,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.GetRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "GetRule" + "shortName": "AddAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -58801,9 +59037,13 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, + { + "name": "network_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58817,14 +59057,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SecurityPolicyRule", - "shortName": "get_rule" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_association" }, - "description": "Sample for GetRule", - "file": "compute_v1beta_generated_region_security_policies_get_rule_sync.py", + "description": "Sample for AddAssociation", + "file": "compute_v1beta_generated_region_network_policies_add_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_GetRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddAssociation_sync", "segments": [ { "end": 53, @@ -58857,28 +59097,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_get_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_add_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Get" + "shortName": "AddTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AddTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -58889,9 +59129,13 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, + { + "name": "network_policy_traffic_classification_rule_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58905,14 +59149,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SecurityPolicy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_traffic_classification_rule" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_security_policies_get_sync.py", + "description": "Sample for AddTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -58945,41 +59189,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_get_sync.py" + "title": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Insert" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionNetworkPoliciesRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "security_policy_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58993,14 +59229,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_security_policies_insert_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AggregatedList_sync", "segments": [ { "end": 52, @@ -59018,43 +59254,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSecurityPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkPolicyRequest" }, { "name": "project", @@ -59064,6 +59300,10 @@ "name": "region", "type": "str" }, + { + "name": "network_policy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59077,14 +59317,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_security_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_security_policies_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Delete_sync", "segments": [ { "end": 53, @@ -59102,43 +59342,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_list_sync.py" + "title": "compute_v1beta_generated_region_network_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.PatchRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "PatchRule" + "shortName": "GetAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -59149,13 +59389,9 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, - { - "name": "security_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59169,14 +59405,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_rule" + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation", + "shortName": "get_association" }, - "description": "Sample for PatchRule", - "file": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py", + "description": "Sample for GetAssociation", + "file": "compute_v1beta_generated_region_network_policies_get_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_PatchRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetAssociation_sync", "segments": [ { "end": 53, @@ -59209,28 +59445,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Patch" + "shortName": "GetTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -59241,13 +59477,9 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, - { - "name": "security_policy_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59261,14 +59493,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule", + "shortName": "get_traffic_classification_rule" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_security_policies_patch_sync.py", + "description": "Sample for GetTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -59301,28 +59533,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.remove_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.RemoveRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "RemoveRule" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkPolicyRequest" }, { "name": "project", @@ -59333,7 +59565,7 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { @@ -59349,14 +59581,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_rule" + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicy", + "shortName": "get" }, - "description": "Sample for RemoveRule", - "file": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_network_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_RemoveRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Get_sync", "segments": [ { "end": 53, @@ -59389,28 +59621,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "SetLabels" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkPolicyRequest" }, { "name": "project", @@ -59421,12 +59653,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "network_policy_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicy" }, { "name": "retry", @@ -59442,21 +59670,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "insert" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_security_policies_set_labels_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_network_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -59466,43 +59694,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_set_labels_sync.py" + "title": "compute_v1beta_generated_region_network_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", - "shortName": "RegionSnapshotSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", - "shortName": "RegionSnapshotSettings" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Get" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotSettingRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkPoliciesRequest" }, { "name": "project", @@ -59525,22 +59753,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SnapshotSettings", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_snapshot_settings_get_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_network_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59560,33 +59788,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshot_settings_get_sync.py" + "title": "compute_v1beta_generated_region_network_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", - "shortName": "RegionSnapshotSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.PatchTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", - "shortName": "RegionSnapshotSettings" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Patch" + "shortName": "PatchTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSnapshotSettingRequest" + "type": "google.cloud.compute_v1beta.types.PatchTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -59597,8 +59825,12 @@ "type": "str" }, { - "name": "snapshot_settings_resource", - "type": "google.cloud.compute_v1beta.types.SnapshotSettings" + "name": "network_policy", + "type": "str" + }, + { + "name": "network_policy_traffic_classification_rule_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" }, { "name": "retry", @@ -59614,21 +59846,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "patch_traffic_classification_rule" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py", + "description": "Sample for PatchTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_PatchTrafficClassificationRule_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59638,43 +59870,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py" + "title": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkPolicyRequest" }, { "name": "project", @@ -59685,9 +59917,13 @@ "type": "str" }, { - "name": "snapshot", + "name": "network_policy", "type": "str" }, + { + "name": "network_policy_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59702,13 +59938,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_snapshots_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_network_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Patch_sync", "segments": [ { "end": 53, @@ -59741,28 +59977,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_delete_sync.py" + "title": "compute_v1beta_generated_region_network_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "GetIamPolicy" + "shortName": "RemoveAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -59773,7 +60009,7 @@ "type": "str" }, { - "name": "resource", + "name": "network_policy", "type": "str" }, { @@ -59789,14 +60025,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_association" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py", + "description": "Sample for RemoveAssociation", + "file": "compute_v1beta_generated_region_network_policies_remove_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveAssociation_sync", "segments": [ { "end": 53, @@ -59829,28 +60065,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_network_policies_remove_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Get" + "shortName": "RemoveTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.RemoveTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -59861,7 +60097,7 @@ "type": "str" }, { - "name": "snapshot", + "name": "network_policy", "type": "str" }, { @@ -59877,14 +60113,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Snapshot", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_traffic_classification_rule" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_snapshots_get_sync.py", + "description": "Sample for RemoveTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -59917,28 +60153,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_get_sync.py" + "title": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNotificationEndpointRequest" }, { "name": "project", @@ -59949,8 +60185,8 @@ "type": "str" }, { - "name": "snapshot_resource", - "type": "google.cloud.compute_v1beta.types.Snapshot" + "name": "notification_endpoint", + "type": "str" }, { "name": "retry", @@ -59966,21 +60202,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_snapshots_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59990,43 +60226,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_insert_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.List", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSnapshotsRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNotificationEndpointRequest" }, { "name": "project", @@ -60036,6 +60272,10 @@ "name": "region", "type": "str" }, + { + "name": "notification_endpoint", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60049,14 +60289,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_snapshots.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.NotificationEndpoint", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_snapshots_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_notification_endpoints_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_List_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Get_sync", "segments": [ { "end": 53, @@ -60074,43 +60314,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_list_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "SetIamPolicy" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNotificationEndpointRequest" }, { "name": "project", @@ -60121,12 +60361,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + "name": "notification_endpoint_resource", + "type": "google.cloud.compute_v1beta.types.NotificationEndpoint" }, { "name": "retry", @@ -60141,22 +60377,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -60166,43 +60402,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "SetLabels" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNotificationEndpointsRequest" }, { "name": "project", @@ -60212,14 +60448,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60233,14 +60461,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "resultType": "google.cloud.compute_v1beta.services.region_notification_endpoints.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_snapshots_set_labels_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_notification_endpoints_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_List_sync", "segments": [ { "end": 53, @@ -60258,43 +60486,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_set_labels_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNotificationEndpointRequest" }, { "name": "project", @@ -60329,10 +60557,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -60365,28 +60593,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Delete", + "fullName": "google.cloud.compute.v1beta.RegionOperations.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionOperationRequest" }, { "name": "project", @@ -60397,7 +60625,7 @@ "type": "str" }, { - "name": "ssl_certificate", + "name": "operation", "type": "str" }, { @@ -60413,14 +60641,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", + "resultType": "google.cloud.compute_v1beta.types.DeleteRegionOperationResponse", "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py", + "file": "compute_v1beta_generated_region_operations_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_Delete_sync", "segments": [ { "end": 53, @@ -60453,28 +60681,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py" + "title": "compute_v1beta_generated_region_operations_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Get", + "fullName": "google.cloud.compute.v1beta.RegionOperations.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionOperationRequest" }, { "name": "project", @@ -60485,7 +60713,7 @@ "type": "str" }, { - "name": "ssl_certificate", + "name": "operation", "type": "str" }, { @@ -60501,14 +60729,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslCertificate", + "resultType": "google.cloud.compute_v1beta.types.Operation", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_ssl_certificates_get_sync.py", + "file": "compute_v1beta_generated_region_operations_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Get_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_Get_sync", "segments": [ { "end": 53, @@ -60541,116 +60769,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_get_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.insert", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Insert", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" - }, - "shortName": "Insert" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSslCertificateRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "region", - "type": "str" - }, - { - "name": "ssl_certificate_resource", - "type": "google.cloud.compute_v1beta.types.SslCertificate" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" - }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Insert_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py" + "title": "compute_v1beta_generated_region_operations_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.List", + "fullName": "google.cloud.compute.v1beta.RegionOperations.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSslCertificatesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionOperationsRequest" }, { "name": "project", @@ -60673,14 +60813,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_ssl_certificates.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_operations.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_ssl_certificates_list_sync.py", + "file": "compute_v1beta_generated_region_operations_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_List_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_List_sync", "segments": [ { "end": 53, @@ -60713,28 +60853,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_list_sync.py" + "title": "compute_v1beta_generated_region_operations_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.wait", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionOperations.Wait", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, - "shortName": "TestIamPermissions" + "shortName": "Wait" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.WaitRegionOperationRequest" }, { "name": "project", @@ -60745,13 +60885,9 @@ "type": "str" }, { - "name": "resource", + "name": "operation", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60765,14 +60901,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "wait" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py", + "description": "Sample for Wait", + "file": "compute_v1beta_generated_region_operations_wait_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_Wait_sync", "segments": [ { "end": 53, @@ -60805,28 +60941,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_operations_wait_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.add_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.AddRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Delete" + "shortName": "AddRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AddRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -60837,9 +60973,13 @@ "type": "str" }, { - "name": "ssl_policy", + "name": "security_policy", "type": "str" }, + { + "name": "security_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60854,13 +60994,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "add_rule" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_ssl_policies_delete_sync.py", + "description": "Sample for AddRule", + "file": "compute_v1beta_generated_region_security_policies_add_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_AddRule_sync", "segments": [ { "end": 53, @@ -60893,28 +61033,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_security_policies_add_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSecurityPolicyRequest" }, { "name": "project", @@ -60925,7 +61065,7 @@ "type": "str" }, { - "name": "ssl_policy", + "name": "security_policy", "type": "str" }, { @@ -60941,14 +61081,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslPolicy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_ssl_policies_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_security_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Delete_sync", "segments": [ { "end": 53, @@ -60981,28 +61121,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_get_sync.py" + "title": "compute_v1beta_generated_region_security_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.GetRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Insert" + "shortName": "GetRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -61013,8 +61153,8 @@ "type": "str" }, { - "name": "ssl_policy_resource", - "type": "google.cloud.compute_v1beta.types.SslPolicy" + "name": "security_policy", + "type": "str" }, { "name": "retry", @@ -61029,22 +61169,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.SecurityPolicyRule", + "shortName": "get_rule" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_ssl_policies_insert_sync.py", + "description": "Sample for GetRule", + "file": "compute_v1beta_generated_region_security_policies_get_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_GetRule_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -61054,43 +61194,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_security_policies_get_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list_available_features", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.ListAvailableFeatures", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "ListAvailableFeatures" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListAvailableFeaturesRegionSslPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSecurityPolicyRequest" }, { "name": "project", @@ -61100,6 +61240,10 @@ "name": "region", "type": "str" }, + { + "name": "security_policy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61113,22 +61257,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslPoliciesListAvailableFeaturesResponse", - "shortName": "list_available_features" + "resultType": "google.cloud.compute_v1beta.types.SecurityPolicy", + "shortName": "get" }, - "description": "Sample for ListAvailableFeatures", - "file": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_security_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_ListAvailableFeatures_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -61138,43 +61282,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py" + "title": "compute_v1beta_generated_region_security_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "List" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSslPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSecurityPolicyRequest" }, { "name": "project", @@ -61184,6 +61328,10 @@ "name": "region", "type": "str" }, + { + "name": "security_policy_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61197,22 +61345,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_ssl_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_ssl_policies_list_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_security_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -61232,33 +61380,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 53, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_list_sync.py" + "title": "compute_v1beta_generated_region_security_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Patch" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSecurityPoliciesRequest" }, { "name": "project", @@ -61268,14 +61416,6 @@ "name": "region", "type": "str" }, - { - "name": "ssl_policy", - "type": "str" - }, - { - "name": "ssl_policy_resource", - "type": "google.cloud.compute_v1beta.types.SslPolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61289,14 +61429,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.services.region_security_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_ssl_policies_patch_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_security_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_List_sync", "segments": [ { "end": 53, @@ -61314,43 +61454,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_security_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.PatchRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "PatchRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -61361,12 +61501,12 @@ "type": "str" }, { - "name": "resource", + "name": "security_policy", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "security_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" }, { "name": "retry", @@ -61381,14 +61521,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch_rule" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py", + "description": "Sample for PatchRule", + "file": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_PatchRule_sync", "segments": [ { "end": 53, @@ -61421,28 +61561,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSecurityPolicyRequest" }, { "name": "project", @@ -61453,9 +61593,13 @@ "type": "str" }, { - "name": "target_http_proxy", + "name": "security_policy", "type": "str" }, + { + "name": "security_policy_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61470,13 +61614,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_security_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Patch_sync", "segments": [ { "end": 53, @@ -61509,28 +61653,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_security_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.remove_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.RemoveRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Get" + "shortName": "RemoveRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -61541,7 +61685,7 @@ "type": "str" }, { - "name": "target_http_proxy", + "name": "security_policy", "type": "str" }, { @@ -61557,14 +61701,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetHttpProxy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_rule" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_http_proxies_get_sync.py", + "description": "Sample for RemoveRule", + "file": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_RemoveRule_sync", "segments": [ { "end": 53, @@ -61597,28 +61741,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Insert" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSecurityPolicyRequest" }, { "name": "project", @@ -61629,8 +61773,12 @@ "type": "str" }, { - "name": "target_http_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpProxy" + "name": "resource", + "type": "str" + }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" }, { "name": "retry", @@ -61646,21 +61794,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "set_labels" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_security_policies_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_SetLabels_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -61670,43 +61818,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_security_policies_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", + "shortName": "RegionSnapshotSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", + "shortName": "RegionSnapshotSettings" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpProxiesRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotSettingRequest" }, { "name": "project", @@ -61729,22 +61877,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_http_proxies.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.SnapshotSettings", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_http_proxies_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_snapshot_settings_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Get_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -61764,33 +61912,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 53, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_list_sync.py" + "title": "compute_v1beta_generated_region_snapshot_settings_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", + "shortName": "RegionSnapshotSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.set_url_map", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.SetUrlMap", + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", + "shortName": "RegionSnapshotSettings" }, - "shortName": "SetUrlMap" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSnapshotSettingRequest" }, { "name": "project", @@ -61801,12 +61949,8 @@ "type": "str" }, { - "name": "target_http_proxy", - "type": "str" - }, - { - "name": "url_map_reference_resource", - "type": "google.cloud.compute_v1beta.types.UrlMapReference" + "name": "snapshot_settings_resource", + "type": "google.cloud.compute_v1beta.types.SnapshotSettings" }, { "name": "retry", @@ -61822,21 +61966,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_url_map" + "shortName": "patch" }, - "description": "Sample for SetUrlMap", - "file": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_SetUrlMap_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Patch_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -61846,43 +61990,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py" + "title": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "TestIamPermissions" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSnapshotRequest" }, { "name": "project", @@ -61893,13 +62037,9 @@ "type": "str" }, { - "name": "resource", + "name": "snapshot", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61913,14 +62053,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_snapshots_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Delete_sync", "segments": [ { "end": 53, @@ -61953,28 +62093,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_snapshots_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "Delete" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionSnapshotRequest" }, { "name": "project", @@ -61985,7 +62125,7 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "resource", "type": "str" }, { @@ -62001,14 +62141,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -62041,28 +62181,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotRequest" }, { "name": "project", @@ -62073,7 +62213,7 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "snapshot", "type": "str" }, { @@ -62089,14 +62229,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetHttpsProxy", + "resultType": "google.cloud.compute_v1beta.types.Snapshot", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_https_proxies_get_sync.py", + "file": "compute_v1beta_generated_region_snapshots_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Get_sync", "segments": [ { "end": 53, @@ -62129,28 +62269,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_snapshots_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSnapshotRequest" }, { "name": "project", @@ -62161,8 +62301,8 @@ "type": "str" }, { - "name": "target_https_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" + "name": "snapshot_resource", + "type": "google.cloud.compute_v1beta.types.Snapshot" }, { "name": "retry", @@ -62181,10 +62321,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py", + "file": "compute_v1beta_generated_region_snapshots_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Insert_sync", "segments": [ { "end": 52, @@ -62217,28 +62357,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_snapshots_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpsProxiesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSnapshotsRequest" }, { "name": "project", @@ -62261,14 +62401,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_https_proxies.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_snapshots.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_https_proxies_list_sync.py", + "file": "compute_v1beta_generated_region_snapshots_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_List_sync", "segments": [ { "end": 53, @@ -62301,120 +62441,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_list_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" - }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.patch", - "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Patch", - "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" - }, - "shortName": "Patch" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionTargetHttpsProxyRequest" - }, - { - "name": "project", - "type": "str" - }, - { - "name": "region", - "type": "str" - }, - { - "name": "target_https_proxy", - "type": "str" - }, - { - "name": "target_https_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, Union[str, bytes]]]" - } - ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" - }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Patch_sync", - "segments": [ - { - "end": 53, - "start": 27, - "type": "FULL" - }, - { - "end": 53, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 47, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 50, - "start": 48, - "type": "REQUEST_EXECUTION" - }, - { - "end": 54, - "start": 51, - "type": "RESPONSE_HANDLING" - } - ], - "title": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py" + "title": "compute_v1beta_generated_region_snapshots_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_ssl_certificates", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetSslCertificates", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "SetSslCertificates" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetSslCertificatesRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionSnapshotRequest" }, { "name": "project", @@ -62425,12 +62473,12 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "resource", "type": "str" }, { - "name": "region_target_https_proxies_set_ssl_certificates_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionTargetHttpsProxiesSetSslCertificatesRequest" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -62445,14 +62493,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_ssl_certificates" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for SetSslCertificates", - "file": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetSslCertificates_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -62485,28 +62533,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py" + "title": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_url_map", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetUrlMap", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "SetUrlMap" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSnapshotRequest" }, { "name": "project", @@ -62517,12 +62565,12 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "resource", "type": "str" }, { - "name": "url_map_reference_resource", - "type": "google.cloud.compute_v1beta.types.UrlMapReference" + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" }, { "name": "retry", @@ -62538,13 +62586,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_url_map" + "shortName": "set_labels" }, - "description": "Sample for SetUrlMap", - "file": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_snapshots_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetUrlMap_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_SetLabels_sync", "segments": [ { "end": 53, @@ -62577,28 +62625,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py" + "title": "compute_v1beta_generated_region_snapshots_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSnapshotRequest" }, { "name": "project", @@ -62633,10 +62681,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -62669,28 +62717,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSslCertificateRequest" }, { "name": "project", @@ -62701,7 +62749,7 @@ "type": "str" }, { - "name": "target_tcp_proxy", + "name": "ssl_certificate", "type": "str" }, { @@ -62721,10 +62769,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py", + "file": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Delete_sync", "segments": [ { "end": 53, @@ -62757,28 +62805,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSslCertificateRequest" }, { "name": "project", @@ -62789,7 +62837,7 @@ "type": "str" }, { - "name": "target_tcp_proxy", + "name": "ssl_certificate", "type": "str" }, { @@ -62805,14 +62853,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetTcpProxy", + "resultType": "google.cloud.compute_v1beta.types.SslCertificate", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py", + "file": "compute_v1beta_generated_region_ssl_certificates_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Get_sync", "segments": [ { "end": 53, @@ -62845,28 +62893,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSslCertificateRequest" }, { "name": "project", @@ -62877,8 +62925,8 @@ "type": "str" }, { - "name": "target_tcp_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetTcpProxy" + "name": "ssl_certificate_resource", + "type": "google.cloud.compute_v1beta.types.SslCertificate" }, { "name": "retry", @@ -62897,10 +62945,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py", + "file": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Insert_sync", "segments": [ { "end": 52, @@ -62933,28 +62981,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetTcpProxiesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSslCertificatesRequest" }, { "name": "project", @@ -62977,14 +63025,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_tcp_proxies.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_ssl_certificates.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py", + "file": "compute_v1beta_generated_region_ssl_certificates_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_List_sync", "segments": [ { "end": 53, @@ -63017,28 +63065,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslCertificateRequest" }, { "name": "project", @@ -63073,10 +63121,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -63109,28 +63157,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSslPolicyRequest" }, { "name": "project", @@ -63141,7 +63189,7 @@ "type": "str" }, { - "name": "url_map", + "name": "ssl_policy", "type": "str" }, { @@ -63161,10 +63209,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_url_maps_delete_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Delete_sync", "segments": [ { "end": 53, @@ -63197,28 +63245,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_delete_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Get", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSslPolicyRequest" }, { "name": "project", @@ -63229,7 +63277,7 @@ "type": "str" }, { - "name": "url_map", + "name": "ssl_policy", "type": "str" }, { @@ -63245,14 +63293,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.UrlMap", + "resultType": "google.cloud.compute_v1beta.types.SslPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_url_maps_get_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Get_sync", "segments": [ { "end": 53, @@ -63285,28 +63333,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_get_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSslPolicyRequest" }, { "name": "project", @@ -63317,8 +63365,8 @@ "type": "str" }, { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" + "name": "ssl_policy_resource", + "type": "google.cloud.compute_v1beta.types.SslPolicy" }, { "name": "retry", @@ -63337,10 +63385,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_url_maps_insert_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Insert_sync", "segments": [ { "end": 52, @@ -63373,28 +63421,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_insert_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.invalidate_cache", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list_available_features", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.InvalidateCache", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.ListAvailableFeatures", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "InvalidateCache" + "shortName": "ListAvailableFeatures" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InvalidateCacheRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.ListAvailableFeaturesRegionSslPoliciesRequest" }, { "name": "project", @@ -63404,14 +63452,6 @@ "name": "region", "type": "str" }, - { - "name": "url_map", - "type": "str" - }, - { - "name": "cache_invalidation_rule_resource", - "type": "google.cloud.compute_v1beta.types.CacheInvalidationRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63425,22 +63465,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "invalidate_cache" + "resultType": "google.cloud.compute_v1beta.types.SslPoliciesListAvailableFeaturesResponse", + "shortName": "list_available_features" }, - "description": "Sample for InvalidateCache", - "file": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py", + "description": "Sample for ListAvailableFeatures", + "file": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_InvalidateCache_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_ListAvailableFeatures_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -63450,43 +63490,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.List", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionUrlMapsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSslPoliciesRequest" }, { "name": "project", @@ -63509,14 +63549,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_url_maps.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_ssl_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_url_maps_list_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_List_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_List_sync", "segments": [ { "end": 53, @@ -63549,28 +63589,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_list_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Patch", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSslPolicyRequest" }, { "name": "project", @@ -63581,12 +63621,12 @@ "type": "str" }, { - "name": "url_map", + "name": "ssl_policy", "type": "str" }, { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" + "name": "ssl_policy_resource", + "type": "google.cloud.compute_v1beta.types.SslPolicy" }, { "name": "retry", @@ -63605,10 +63645,10 @@ "shortName": "patch" }, "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_url_maps_patch_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Patch_sync", "segments": [ { "end": 53, @@ -63641,28 +63681,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_patch_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslPolicyRequest" }, { "name": "project", @@ -63697,10 +63737,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -63733,28 +63773,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.update", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Update", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "Update" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63765,13 +63805,9 @@ "type": "str" }, { - "name": "url_map", + "name": "target_http_proxy", "type": "str" }, - { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63786,13 +63822,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "delete" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_url_maps_update_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Update_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Delete_sync", "segments": [ { "end": 53, @@ -63825,28 +63861,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_update_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.validate", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Validate", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "Validate" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ValidateRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63857,13 +63893,9 @@ "type": "str" }, { - "name": "url_map", + "name": "target_http_proxy", "type": "str" }, - { - "name": "region_url_maps_validate_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionUrlMapsValidateRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63877,14 +63909,2334 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.UrlMapsValidateResponse", - "shortName": "validate" + "resultType": "google.cloud.compute_v1beta.types.TargetHttpProxy", + "shortName": "get" }, - "description": "Sample for Validate", - "file": "compute_v1beta_generated_region_url_maps_validate_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_target_http_proxies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Validate_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_http_proxies_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_http_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpProxy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpProxiesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_target_http_proxies.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_target_http_proxies_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_http_proxies_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.set_url_map", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.SetUrlMap", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" + }, + "shortName": "SetUrlMap" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_http_proxy", + "type": "str" + }, + { + "name": "url_map_reference_resource", + "type": "google.cloud.compute_v1beta.types.UrlMapReference" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_url_map" + }, + "description": "Sample for SetUrlMap", + "file": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_SetUrlMap_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TargetHttpsProxy", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_target_https_proxies_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpsProxiesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_target_https_proxies.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_target_https_proxies_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.patch", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Patch", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "Patch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PatchRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "target_https_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" + }, + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Patch_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_ssl_certificates", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetSslCertificates", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "SetSslCertificates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetSslCertificatesRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "region_target_https_proxies_set_ssl_certificates_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionTargetHttpsProxiesSetSslCertificatesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_ssl_certificates" + }, + "description": "Sample for SetSslCertificates", + "file": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetSslCertificates_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_url_map", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetUrlMap", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "SetUrlMap" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "url_map_reference_resource", + "type": "google.cloud.compute_v1beta.types.UrlMapReference" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_url_map" + }, + "description": "Sample for SetUrlMap", + "file": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetUrlMap_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_tcp_proxy", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_tcp_proxy", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TargetTcpProxy", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_tcp_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetTcpProxy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionTargetTcpProxiesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_target_tcp_proxies.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_url_maps_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.UrlMap", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_url_maps_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_url_maps_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.invalidate_cache", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.InvalidateCache", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "InvalidateCache" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InvalidateCacheRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "cache_invalidation_rule_resource", + "type": "google.cloud.compute_v1beta.types.CacheInvalidationRule" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "invalidate_cache" + }, + "description": "Sample for InvalidateCache", + "file": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_InvalidateCache_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionUrlMapsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_url_maps.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_url_maps_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.patch", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Patch", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Patch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PatchRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" + }, + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_url_maps_patch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Patch_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_patch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.update", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Update", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Update" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.UpdateRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" + }, + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_url_maps_update_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Update_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_update_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.validate", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Validate", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Validate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ValidateRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "region_url_maps_validate_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionUrlMapsValidateRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.UrlMapsValidateResponse", + "shortName": "validate" + }, + "description": "Sample for Validate", + "file": "compute_v1beta_generated_region_url_maps_validate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Validate_sync", "segments": [ { "end": 53, @@ -63923,29 +66275,285 @@ "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionZonesClient", - "shortName": "RegionZonesClient" + "fullName": "google.cloud.compute_v1beta.RegionZonesClient", + "shortName": "RegionZonesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionZonesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionZones.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionZones", + "shortName": "RegionZones" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionZonesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_zones.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_zones_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionZones_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_zones_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionsClient", + "shortName": "RegionsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.Regions.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.Regions", + "shortName": "Regions" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Region", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_regions_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Regions_Get_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_regions_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionsClient", + "shortName": "RegionsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionsClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.Regions.List", + "service": { + "fullName": "google.cloud.compute.v1beta.Regions", + "shortName": "Regions" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.regions.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_regions_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Regions_List_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_regions_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionZonesClient.list", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionZones.List", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionZones", - "shortName": "RegionZones" + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" }, - "shortName": "List" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionZonesRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationBlockRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", "type": "str" }, { @@ -63961,22 +66569,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_zones.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_zones_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionZones_List_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -63986,50 +66594,58 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 50, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_zones_list_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionsClient", - "shortName": "RegionsClient" + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionsClient.get", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.Regions.Get", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.Regions", - "shortName": "Regions" + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionRequest" + "type": "google.cloud.compute_v1beta.types.GetReservationBlockRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "zone", + "type": "str" + }, + { + "name": "reservation", + "type": "str" + }, + { + "name": "reservation_block", "type": "str" }, { @@ -64045,22 +66661,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Region", + "resultType": "google.cloud.compute_v1beta.types.ReservationBlocksGetResponse", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_regions_get_sync.py", + "file": "compute_v1beta_generated_reservation_blocks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Regions_Get_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_Get_sync", "segments": [ { - "end": 52, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 54, "start": 27, "type": "SHORT" }, @@ -64070,48 +66686,56 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_regions_get_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionsClient", - "shortName": "RegionsClient" + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionsClient.list", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.Regions.List", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.List", "service": { - "fullName": "google.cloud.compute.v1beta.Regions", - "shortName": "Regions" + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionsRequest" + "type": "google.cloud.compute_v1beta.types.ListReservationBlocksRequest" }, { "name": "project", "type": "str" }, + { + "name": "zone", + "type": "str" + }, + { + "name": "reservation", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64125,22 +66749,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.regions.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.reservation_blocks.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_regions_list_sync.py", + "file": "compute_v1beta_generated_reservation_blocks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Regions_List_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_List_sync", "segments": [ { - "end": 52, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 54, "start": 27, "type": "SHORT" }, @@ -64150,22 +66774,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 55, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_regions_list_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_list_sync.py" }, { "canonical": true, @@ -64174,19 +66798,19 @@ "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.perform_maintenance", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.Get", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.PerformMaintenance", "service": { "fullName": "google.cloud.compute.v1beta.ReservationBlocks", "shortName": "ReservationBlocks" }, - "shortName": "Get" + "shortName": "PerformMaintenance" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetReservationBlockRequest" + "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationBlockRequest" }, { "name": "project", @@ -64204,6 +66828,10 @@ "name": "reservation_block", "type": "str" }, + { + "name": "reservations_blocks_perform_maintenance_request_resource", + "type": "google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64217,14 +66845,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ReservationBlocksGetResponse", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "perform_maintenance" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_reservation_blocks_get_sync.py", + "description": "Sample for PerformMaintenance", + "file": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_Get_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_PerformMaintenance_sync", "segments": [ { "end": 54, @@ -64257,7 +66885,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_get_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py" }, { "canonical": true, @@ -64266,19 +66894,19 @@ "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.list", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.List", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.SetIamPolicy", "service": { "fullName": "google.cloud.compute.v1beta.ReservationBlocks", "shortName": "ReservationBlocks" }, - "shortName": "List" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListReservationBlocksRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationBlockRequest" }, { "name": "project", @@ -64289,9 +66917,17 @@ "type": "str" }, { - "name": "reservation", + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", "type": "str" }, + { + "name": "zone_set_nested_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64305,14 +66941,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.reservation_blocks.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_reservation_blocks_list_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_List_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync", "segments": [ { "end": 54, @@ -64330,22 +66966,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { "end": 55, - "start": 51, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_list_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py" }, { "canonical": true, @@ -64354,19 +66990,19 @@ "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", "shortName": "ReservationBlocksClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.perform_maintenance", + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.PerformMaintenance", + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.TestIamPermissions", "service": { "fullName": "google.cloud.compute.v1beta.ReservationBlocks", "shortName": "ReservationBlocks" }, - "shortName": "PerformMaintenance" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationBlockRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationBlockRequest" }, { "name": "project", @@ -64377,16 +67013,16 @@ "type": "str" }, { - "name": "reservation", + "name": "parent_resource", "type": "str" }, { - "name": "reservation_block", + "name": "resource", "type": "str" }, { - "name": "reservations_blocks_perform_maintenance_request_resource", - "type": "google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -64401,14 +67037,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "perform_maintenance" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for PerformMaintenance", - "file": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_PerformMaintenance_sync", + "regionTag": "compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync", "segments": [ { "end": 54, @@ -64441,7 +67077,99 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py" + "title": "compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.get_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.GetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py" }, { "canonical": true, @@ -64811,6 +67539,198 @@ ], "title": "compute_v1beta_generated_reservation_sub_blocks_report_faulty_sync.py" }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.set_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.SetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "zone_set_nested_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py" + }, { "canonical": true, "clientMethod": { @@ -82361,28 +85281,376 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_gateways_set_labels_sync.py" + "title": "compute_v1beta_generated_vpn_gateways_set_labels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient", + "shortName": "VpnGatewaysClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnGateways.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnGateways", + "shortName": "VpnGateways" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnGatewayRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnGateways_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.aggregated_list", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.AggregatedList", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "AggregatedList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.AggregatedListVpnTunnelsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteVpnTunnelRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "vpn_tunnel", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_vpn_tunnels_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetVpnTunnelRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "vpn_tunnel", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.VpnTunnel", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_vpn_tunnels_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient", - "shortName": "VpnGatewaysClient" + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.VpnGateways.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.VpnGateways", - "shortName": "VpnGateways" + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnGatewayRequest" + "type": "google.cloud.compute_v1beta.types.InsertVpnTunnelRequest" }, { "name": "project", @@ -82393,12 +85661,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "vpn_tunnel_resource", + "type": "google.cloud.compute_v1beta.types.VpnTunnel" }, { "name": "retry", @@ -82413,22 +85677,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_vpn_tunnels_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnGateways_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -82438,22 +85702,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_insert_sync.py" }, { "canonical": true, @@ -82462,24 +85726,28 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.AggregatedList", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.List", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "AggregatedList" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListVpnTunnelsRequest" + "type": "google.cloud.compute_v1beta.types.ListVpnTunnelsRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82493,22 +85761,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_vpn_tunnels_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -82518,22 +85786,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_list_sync.py" }, { "canonical": true, @@ -82542,19 +85810,19 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.delete", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Delete", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.SetLabels", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "Delete" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsVpnTunnelRequest" }, { "name": "project", @@ -82565,9 +85833,13 @@ "type": "str" }, { - "name": "vpn_tunnel", + "name": "resource", "type": "str" }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82582,13 +85854,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "set_labels" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_vpn_tunnels_delete_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Delete_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_SetLabels_sync", "segments": [ { "end": 53, @@ -82621,7 +85893,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_delete_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py" }, { "canonical": true, @@ -82630,19 +85902,19 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.get", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Get", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.TestIamPermissions", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnTunnelRequest" }, { "name": "project", @@ -82653,9 +85925,13 @@ "type": "str" }, { - "name": "vpn_tunnel", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82669,14 +85945,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.VpnTunnel", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_vpn_tunnels_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Get_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -82709,40 +85985,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_get_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.insert", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Insert", + "fullName": "google.cloud.compute.v1beta.WireGroups.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.DeleteWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "cross_site_network", "type": "str" }, { - "name": "vpn_tunnel_resource", - "type": "google.cloud.compute_v1beta.types.VpnTunnel" + "name": "wire_group", + "type": "str" }, { "name": "retry", @@ -82758,21 +86034,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_vpn_tunnels_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_wire_groups_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Insert_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -82782,50 +86058,54 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_insert_sync.py" + "title": "compute_v1beta_generated_wire_groups_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.list", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.List", + "fullName": "google.cloud.compute.v1beta.WireGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListVpnTunnelsRequest" + "type": "google.cloud.compute_v1beta.types.GetWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "cross_site_network", + "type": "str" + }, + { + "name": "wire_group", "type": "str" }, { @@ -82841,14 +86121,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.WireGroup", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_vpn_tunnels_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_wire_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_List_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Get_sync", "segments": [ { "end": 53, @@ -82866,59 +86146,55 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_list_sync.py" + "title": "compute_v1beta_generated_wire_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.SetLabels", + "fullName": "google.cloud.compute.v1beta.WireGroups.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "SetLabels" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.InsertWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource", + "name": "cross_site_network", "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "wire_group_resource", + "type": "google.cloud.compute_v1beta.types.WireGroup" }, { "name": "retry", @@ -82934,21 +86210,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "insert" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_wire_groups_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_SetLabels_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -82958,60 +86234,52 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py" + "title": "compute_v1beta_generated_wire_groups_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.WireGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.ListWireGroupsRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource", + "name": "cross_site_network", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83025,14 +86293,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.wire_groups.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_wire_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_WireGroups_List_sync", "segments": [ { "end": 53, @@ -83050,22 +86318,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_wire_groups_list_sync.py" }, { "canonical": true, @@ -83074,19 +86342,19 @@ "fullName": "google.cloud.compute_v1beta.WireGroupsClient", "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.delete", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Delete", + "fullName": "google.cloud.compute.v1beta.WireGroups.Patch", "service": { "fullName": "google.cloud.compute.v1beta.WireGroups", "shortName": "WireGroups" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.PatchWireGroupRequest" }, { "name": "project", @@ -83100,6 +86368,10 @@ "name": "wire_group", "type": "str" }, + { + "name": "wire_group_resource", + "type": "google.cloud.compute_v1beta.types.WireGroup" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83114,13 +86386,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_wire_groups_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_wire_groups_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Delete_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Patch_sync", "segments": [ { "end": 53, @@ -83153,39 +86425,39 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_delete_sync.py" + "title": "compute_v1beta_generated_wire_groups_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Get", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.DeleteZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group", + "name": "operation", "type": "str" }, { @@ -83201,14 +86473,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.WireGroup", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.DeleteZoneOperationResponse", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_wire_groups_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_zone_operations_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Get_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Delete_sync", "segments": [ { "end": 53, @@ -83241,40 +86513,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_get_sync.py" + "title": "compute_v1beta_generated_zone_operations_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.insert", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Insert", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Get", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Insert" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.GetZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group_resource", - "type": "google.cloud.compute_v1beta.types.WireGroup" + "name": "operation", + "type": "str" }, { "name": "retry", @@ -83289,22 +86561,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "get" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_wire_groups_insert_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_zone_operations_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Insert_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -83314,50 +86586,50 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_insert_sync.py" + "title": "compute_v1beta_generated_zone_operations_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.list", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.List", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.List", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListWireGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListZoneOperationsRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { @@ -83373,14 +86645,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.wire_groups.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.zone_operations.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_wire_groups_list_sync.py", + "file": "compute_v1beta_generated_zone_operations_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_List_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_List_sync", "segments": [ { "end": 53, @@ -83413,45 +86685,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_list_sync.py" + "title": "compute_v1beta_generated_zone_operations_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.patch", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.wait", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Patch", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Wait", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Patch" + "shortName": "Wait" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.WaitZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group", + "name": "operation", "type": "str" }, - { - "name": "wire_group_resource", - "type": "google.cloud.compute_v1beta.types.WireGroup" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83465,14 +86733,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "wait" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_wire_groups_patch_sync.py", + "description": "Sample for Wait", + "file": "compute_v1beta_generated_zone_operations_wait_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Patch_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Wait_sync", "segments": [ { "end": 53, @@ -83505,28 +86773,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_patch_sync.py" + "title": "compute_v1beta_generated_zone_operations_wait_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.delete", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Delete", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83537,7 +86805,7 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, { @@ -83553,14 +86821,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DeleteZoneOperationResponse", + "resultType": "google.api_core.extended_operation.ExtendedOperation", "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_zone_operations_delete_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Delete_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync", "segments": [ { "end": 53, @@ -83593,28 +86861,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_delete_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.get", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Get", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.GetZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83625,7 +86893,7 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, { @@ -83641,14 +86909,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", + "resultType": "google.cloud.compute_v1beta.types.VmExtensionPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_zone_operations_get_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Get_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync", "segments": [ { "end": 53, @@ -83681,28 +86949,116 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_get_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.list", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.List", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.VmExtensionPolicy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" + }, + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.List", + "service": { + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListZoneOperationsRequest" + "type": "google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest" }, { "name": "project", @@ -83725,14 +87081,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.zone_operations.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_zone_operations_list_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_List_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync", "segments": [ { "end": 53, @@ -83765,28 +87121,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_list_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.wait", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Wait", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Update", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, - "shortName": "Wait" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.WaitZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83797,9 +87153,13 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, + { + "name": "vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.VmExtensionPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83813,14 +87173,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "wait" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Wait", - "file": "compute_v1beta_generated_zone_operations_wait_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_zone_vm_extension_policies_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Wait_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync", "segments": [ { "end": 53, @@ -83853,7 +87213,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_wait_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_update_sync.py" }, { "canonical": true, diff --git a/packages/google-cloud-compute-v1beta/scripts/fixup_compute_v1beta_keywords.py b/packages/google-cloud-compute-v1beta/scripts/fixup_compute_v1beta_keywords.py index f178ce5a4a82..3b3d6549e55f 100644 --- a/packages/google-cloud-compute-v1beta/scripts/fixup_compute_v1beta_keywords.py +++ b/packages/google-cloud-compute-v1beta/scripts/fixup_compute_v1beta_keywords.py @@ -85,6 +85,7 @@ class computeCallTransformer(cst.CSTTransformer): 'expand_ip_cidr_range': ('project', 'region', 'subnetwork', 'subnetworks_expand_ip_cidr_range_request_resource', 'request_id', ), 'get': ('accelerator_type', 'project', 'zone', ), 'get_association': ('firewall_policy', 'name', ), + 'get_available_accelerator_topologies': ('project', 'resource_id', 'zone', ), 'get_diagnostics': ('interconnect', 'project', ), 'get_effective_firewalls': ('instance', 'network_interface', 'project', 'zone', ), 'get_effective_security_policies': ('backend_service', 'project', ), @@ -112,7 +113,7 @@ class computeCallTransformer(cst.CSTTransformer): 'insert': ('address_resource', 'project', 'region', 'request_id', ), 'invalidate_cache': ('cache_invalidation_rule_resource', 'project', 'region', 'url_map', 'request_id', ), 'list': ('project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), - 'list_associations': ('target_resource', ), + 'list_associations': ('include_inherited_policies', 'target_resource', ), 'list_available_features': ('project', 'region', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_bgp_routes': ('project', 'region', 'router', 'address_family', 'destination_prefix', 'filter', 'max_results', 'order_by', 'page_token', 'peer', 'policy_applied', 'return_partial_success', 'route_type', ), 'list_disks': ('project', 'storage_pool', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py index 129029d91616..f0c7c48b6e1d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py @@ -1364,6 +1364,284 @@ def test_add_signed_url_key_unary_rest_flattened_error(transport: str = "rest"): ) +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListBackendBucketsRequest, +): + transport_class = transports.BackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.BackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListBackendBucketsRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketAggregatedList( + items={ + "a": compute.BackendBucketsScopedList(), + "b": compute.BackendBucketsScopedList(), + "c": compute.BackendBucketsScopedList(), + }, + next_page_token="abc", + ), + compute.BackendBucketAggregatedList( + items={}, + next_page_token="def", + ), + compute.BackendBucketAggregatedList( + items={ + "g": compute.BackendBucketsScopedList(), + }, + next_page_token="ghi", + ), + compute.BackendBucketAggregatedList( + items={ + "h": compute.BackendBucketsScopedList(), + "i": compute.BackendBucketsScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.BackendBucketAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.BackendBucketsScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.BackendBucketsScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.BackendBucketsScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + def test_delete_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -5485,6 +5763,144 @@ def test_add_signed_url_key_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListBackendBucketsRequest, +): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListBackendBucketsRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.BackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.BackendBucketsRestInterceptor(), + ) + client = BackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.BackendBucketsRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.BackendBucketsRestInterceptor, "post_aggregated_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.BackendBucketsRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListBackendBucketsRequest.pb( + compute.AggregatedListBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketAggregatedList.to_json( + compute.BackendBucketAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketAggregatedList() + post_with_metadata.return_value = ( + compute.BackendBucketAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + def test_delete_rest_bad_request(request_type=compute.DeleteBackendBucketRequest): client = BackendBucketsClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -5876,6 +6292,7 @@ def test_get_rest_call_success(request_type): kind="kind_value", load_balancing_scheme="load_balancing_scheme_value", name="name_value", + region="region_value", self_link="self_link_value", ) @@ -5904,6 +6321,7 @@ def test_get_rest_call_success(request_type): assert response.kind == "kind_value" assert response.load_balancing_scheme == "load_balancing_scheme_value" assert response.name == "name_value" + assert response.region == "region_value" assert response.self_link == "self_link_value" @@ -6179,6 +6597,7 @@ def test_insert_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -6728,6 +7147,7 @@ def test_patch_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -7714,6 +8134,7 @@ def test_update_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -7947,6 +8368,26 @@ def test_add_signed_url_key_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListBackendBucketsRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_delete_unary_empty_call_rest(): @@ -8216,6 +8657,7 @@ def test_backend_buckets_base_transport(): # raise NotImplementedError. methods = ( "add_signed_url_key", + "aggregated_list", "delete", "delete_signed_url_key", "get", @@ -8368,6 +8810,9 @@ def test_backend_buckets_client_transport_session_collision(transport_name): session1 = client1.transport.add_signed_url_key._session session2 = client2.transport.add_signed_url_key._session assert session1 != session2 + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 session1 = client1.transport.delete._session session2 = client2.transport.delete._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py index 2d5abb7698c5..b3f7ddb6056b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py @@ -7969,6 +7969,7 @@ def test_insert_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -8673,6 +8674,7 @@ def test_patch_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -10062,6 +10064,7 @@ def test_update_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py index 5a6fe1ca73c6..f15142dd5035 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py @@ -2981,6 +2981,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", is_live_migration=True, kind="kind_value", mode="mode_value", @@ -3013,6 +3014,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.is_live_migration is True assert response.kind == "kind_value" assert response.mode == "mode_value" @@ -3136,6 +3138,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -3148,6 +3151,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", @@ -3549,6 +3553,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -3561,6 +3566,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py new file mode 100644 index 000000000000..4416c70ac1aa --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py @@ -0,0 +1,2257 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.global_vm_extension_policies import ( + GlobalVmExtensionPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(None) is None + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + GlobalVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + GlobalVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert GlobalVmExtensionPoliciesClient._get_client_cert_source(None, False) is None + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain(None, None) + == GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + GlobalVmExtensionPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = GlobalVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = GlobalVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (GlobalVmExtensionPoliciesClient, "rest"), + ], +) +def test_global_vm_extension_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.GlobalVmExtensionPoliciesRestTransport, "rest"), + ], +) +def test_global_vm_extension_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (GlobalVmExtensionPoliciesClient, "rest"), + ], +) +def test_global_vm_extension_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_global_vm_extension_policies_client_get_transport_class(): + transport = GlobalVmExtensionPoliciesClient.get_transport_class() + available_transports = [ + transports.GlobalVmExtensionPoliciesRestTransport, + ] + assert transport in available_transports + + transport = GlobalVmExtensionPoliciesClient.get_transport_class("rest") + assert transport == transports.GlobalVmExtensionPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + GlobalVmExtensionPoliciesClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + GlobalVmExtensionPoliciesClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + "true", + ), + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_global_vm_extension_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [GlobalVmExtensionPoliciesClient]) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + +@pytest.mark.parametrize("client_class", [GlobalVmExtensionPoliciesClient]) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +def test_global_vm_extension_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_global_vm_extension_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListGlobalVmExtensionPoliciesRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListGlobalVmExtensionPoliciesRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "a": compute.VmExtensionPoliciesScopedList(), + "b": compute.VmExtensionPoliciesScopedList(), + "c": compute.VmExtensionPoliciesScopedList(), + }, + next_page_token="abc", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={}, + next_page_token="def", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "g": compute.VmExtensionPoliciesScopedList(), + }, + next_page_token="ghi", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "h": compute.VmExtensionPoliciesScopedList(), + "i": compute.VmExtensionPoliciesScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.VmExtensionPolicyAggregatedListResponse.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.VmExtensionPoliciesScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.VmExtensionPoliciesScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.VmExtensionPoliciesScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "globalVmExtensionPolicy", + "project", + ) + ) + ) + + +def test_get_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.GlobalVmExtensionPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = GlobalVmExtensionPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListGlobalVmExtensionPoliciesRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListGlobalVmExtensionPoliciesRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse( + etag="etag_value", + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListGlobalVmExtensionPoliciesRequest.pb( + compute.AggregatedListGlobalVmExtensionPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicyAggregatedListResponse.to_json( + compute.VmExtensionPolicyAggregatedListResponse() + ) + req.return_value.content = return_value + + request = compute.AggregatedListGlobalVmExtensionPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicyAggregatedListResponse() + post_with_metadata.return_value = ( + compute.VmExtensionPolicyAggregatedListResponse(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetGlobalVmExtensionPolicyRequest): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetGlobalVmExtensionPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + id=205, + kind="kind_value", + name="name_value", + priority=898, + scoped_resource_status="scoped_resource_status_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + update_timestamp="update_timestamp_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.GlobalVmExtensionPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.priority == 898 + assert response.scoped_resource_status == "scoped_resource_status_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + assert response.update_timestamp == "update_timestamp_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetGlobalVmExtensionPolicyRequest.pb( + compute.GetGlobalVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.GlobalVmExtensionPolicy.to_json( + compute.GlobalVmExtensionPolicy() + ) + req.return_value.content = return_value + + request = compute.GetGlobalVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.GlobalVmExtensionPolicy() + post_with_metadata.return_value = compute.GlobalVmExtensionPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListGlobalVmExtensionPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetGlobalVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +def test_global_vm_extension_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_global_vm_extension_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "get", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_global_vm_extension_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_global_vm_extension_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.GlobalVmExtensionPoliciesTransport() + adc.assert_called_once() + + +def test_global_vm_extension_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + GlobalVmExtensionPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_global_vm_extension_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.GlobalVmExtensionPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_host_no_port(transport_name): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_host_with_port(transport_name): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = GlobalVmExtensionPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = GlobalVmExtensionPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = GlobalVmExtensionPoliciesClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = GlobalVmExtensionPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = GlobalVmExtensionPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = GlobalVmExtensionPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = GlobalVmExtensionPoliciesClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = GlobalVmExtensionPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = GlobalVmExtensionPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = GlobalVmExtensionPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = GlobalVmExtensionPoliciesClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = GlobalVmExtensionPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.GlobalVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.GlobalVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = GlobalVmExtensionPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py index 3d6586481928..1ca39223f266 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py @@ -4089,6 +4089,228 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_available_accelerator_topologies_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.get_available_accelerator_topologies + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.get_available_accelerator_topologies + ] = mock_rpc + + request = {} + client.get_available_accelerator_topologies(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_available_accelerator_topologies(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_available_accelerator_topologies_rest_required_fields( + request_type=compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, +): + transport_class = transports.InstanceGroupManagersRestTransport + + request_init = {} + request_init["project"] = "" + request_init["resource_id"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_available_accelerator_topologies._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["resourceId"] = "resource_id_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_available_accelerator_topologies._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resourceId" in jsonified_request + assert jsonified_request["resourceId"] == "resource_id_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_available_accelerator_topologies(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_available_accelerator_topologies_rest_unset_required_fields(): + transport = transports.InstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = ( + transport.get_available_accelerator_topologies._get_unset_required_fields({}) + ) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "resourceId", + "zone", + ) + ) + ) + + +def test_get_available_accelerator_topologies_rest_flattened(): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "resource_id": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + resource_id="resource_id_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + ) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_available_accelerator_topologies(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/instanceGroupManagers/{resource_id}/getAvailableAcceleratorTopologies" + % client.transport._host, + args[1], + ) + + +def test_get_available_accelerator_topologies_rest_flattened_error( + transport: str = "rest", +): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_available_accelerator_topologies( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest(), + project="project_value", + zone="zone_value", + resource_id="resource_id_value", + ) + + def test_insert_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -14042,6 +14264,150 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() +def test_get_available_accelerator_topologies_rest_bad_request( + request_type=compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, +): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "resource_id": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_available_accelerator_topologies(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + dict, + ], +) +def test_get_available_accelerator_topologies_rest_call_success(request_type): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "resource_id": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + ) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_available_accelerator_topologies(request) + + # Establish that the response is the type that we expect. + assert isinstance( + response, compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse + ) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_available_accelerator_topologies_rest_interceptors(null_interceptor): + transport = transports.InstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.InstanceGroupManagersRestInterceptor(), + ) + client = InstanceGroupManagersClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "post_get_available_accelerator_topologies", + ) as post, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "post_get_available_accelerator_topologies_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "pre_get_available_accelerator_topologies", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest.pb( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + ) + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.to_json( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + req.return_value.content = return_value + + request = compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + post_with_metadata.return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse(), + metadata, + ) + + client.get_available_accelerator_topologies( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + def test_insert_rest_bad_request( request_type=compute.InsertInstanceGroupManagerRequest, ): @@ -19268,6 +19634,30 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_available_accelerator_topologies_empty_call_rest(): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.get_available_accelerator_topologies), "__call__" + ) as call: + client.get_available_accelerator_topologies(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + ) + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_insert_unary_empty_call_rest(): @@ -19716,6 +20106,7 @@ def test_instance_group_managers_base_transport(): "delete_instances", "delete_per_instance_configs", "get", + "get_available_accelerator_topologies", "insert", "list", "list_errors", @@ -19897,6 +20288,9 @@ def test_instance_group_managers_client_transport_session_collision(transport_na session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_available_accelerator_topologies._session + session2 = client2.transport.get_available_accelerator_topologies._session + assert session1 != session2 session1 = client1.transport.insert._session session2 = client2.transport.insert._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py index a20f3d03c147..6f12af6ab2f0 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py @@ -26504,6 +26504,9 @@ def test_insert_rest_call_success(request_type): "host": "host_value", "subblock": "subblock_value", }, + "reservation_consumption_info": { + "consumed_reservation": "consumed_reservation_value" + }, "scheduling": { "availability_domain": 2002, "termination_timestamp": "termination_timestamp_value", @@ -33414,6 +33417,9 @@ def test_update_rest_call_success(request_type): "host": "host_value", "subblock": "subblock_value", }, + "reservation_consumption_info": { + "consumed_reservation": "consumed_reservation_value" + }, "scheduling": { "availability_domain": 2002, "termination_timestamp": "termination_timestamp_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py index 16f77883bf3f..ffa941a7a468 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py @@ -4403,12 +4403,20 @@ def test_insert_rest_call_success(request_type): "ipsec_internal_addresses_value2", ], "kind": "kind_value", + "l2_forwarding": { + "appliance_mappings": {}, + "default_appliance_ip_address": "default_appliance_ip_address_value", + "geneve_header": {"vni": 333}, + "network": "network_value", + "tunnel_endpoint_ip_address": "tunnel_endpoint_ip_address_value", + }, "label_fingerprint": "label_fingerprint_value", "labels": {}, "mtu": 342, "name": "name_value", "operational_status": "operational_status_value", "pairing_key": "pairing_key_value", + "params": {"resource_manager_tags": {}}, "partner_asn": 1181, "partner_metadata": { "interconnect_name": "interconnect_name_value", @@ -4848,12 +4856,20 @@ def test_patch_rest_call_success(request_type): "ipsec_internal_addresses_value2", ], "kind": "kind_value", + "l2_forwarding": { + "appliance_mappings": {}, + "default_appliance_ip_address": "default_appliance_ip_address_value", + "geneve_header": {"vni": 333}, + "network": "network_value", + "tunnel_endpoint_ip_address": "tunnel_endpoint_ip_address_value", + }, "label_fingerprint": "label_fingerprint_value", "labels": {}, "mtu": 342, "name": "name_value", "operational_status": "operational_status_value", "pairing_key": "pairing_key_value", + "params": {"resource_manager_tags": {}}, "partner_asn": 1181, "partner_metadata": { "interconnect_name": "interconnect_name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py index d128a8b15c8e..d3af0d82d1df 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py @@ -4375,6 +4375,7 @@ def test_insert_rest_call_success(request_type): "name": "name_value", "noc_contact_email": "noc_contact_email_value", "operational_status": "operational_status_value", + "params": {"resource_manager_tags": {}}, "peer_ip_address": "peer_ip_address_value", "provisioned_link_count": 2375, "remote_location": "remote_location_value", @@ -4825,6 +4826,7 @@ def test_patch_rest_call_success(request_type): "name": "name_value", "noc_contact_email": "noc_contact_email_value", "operational_status": "operational_status_value", + "params": {"resource_manager_tags": {}}, "peer_ip_address": "peer_ip_address_value", "provisioned_link_count": 2375, "remote_location": "remote_location_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py index 2913627d004c..acd635d55a14 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py @@ -3943,6 +3943,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", kind="kind_value", name="name_value", pdp_scope="pdp_scope_value", @@ -3972,6 +3973,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.kind == "kind_value" assert response.name == "name_value" assert response.pdp_scope == "pdp_scope_value" @@ -4091,6 +4093,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "kind": "kind_value", "name": "name_value", "pdp_scope": "pdp_scope_value", @@ -4494,6 +4497,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "kind": "kind_value", "name": "name_value", "pdp_scope": "pdp_scope_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py index c9743fbdc72a..f0dd8fd2b237 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py @@ -4486,6 +4486,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", is_live_migration=True, kind="kind_value", mode="mode_value", @@ -4518,6 +4519,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.is_live_migration is True assert response.kind == "kind_value" assert response.mode == "mode_value" @@ -4640,6 +4642,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -4652,6 +4655,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", @@ -5057,6 +5061,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -5069,6 +5074,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py new file mode 100644 index 000000000000..38c31dc26480 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py @@ -0,0 +1,6068 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_backend_buckets import ( + RegionBackendBucketsClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RegionBackendBucketsClient._get_default_mtls_endpoint(None) is None + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + RegionBackendBucketsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionBackendBucketsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert RegionBackendBucketsClient._get_client_cert_source(None, False) is None + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionBackendBucketsClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + default_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RegionBackendBucketsClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint(None, None, mock_universe, "never") + == mock_endpoint + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionBackendBucketsClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionBackendBucketsClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + RegionBackendBucketsClient._get_universe_domain(None, None) + == RegionBackendBucketsClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionBackendBucketsClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionBackendBucketsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionBackendBucketsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionBackendBucketsClient, "rest"), + ], +) +def test_region_backend_buckets_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionBackendBucketsRestTransport, "rest"), + ], +) +def test_region_backend_buckets_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionBackendBucketsClient, "rest"), + ], +) +def test_region_backend_buckets_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_backend_buckets_client_get_transport_class(): + transport = RegionBackendBucketsClient.get_transport_class() + available_transports = [ + transports.RegionBackendBucketsRestTransport, + ] + assert transport in available_transports + + transport = RegionBackendBucketsClient.get_transport_class("rest") + assert transport == transports.RegionBackendBucketsRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(RegionBackendBucketsClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(RegionBackendBucketsClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + "true", + ), + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_backend_buckets_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionBackendBucketsClient]) +@mock.patch.object( + RegionBackendBucketsClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + +@pytest.mark.parametrize("client_class", [RegionBackendBucketsClient]) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + default_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + ), + ], +) +def test_region_backend_buckets_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + None, + ), + ], +) +def test_region_backend_buckets_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "force_delete", + "request_id", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "forceDelete", + "requestId", + ) + ) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "force_delete", + "request_id", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "forceDelete", + "requestId", + ) + ) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetRegionBackendBucketRequest): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "project", + "region", + "resource", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionBackendBucketsRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionBackendBucketsRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + compute.BackendBucket(), + ], + next_page_token="abc", + ), + compute.BackendBucketList( + items=[], + next_page_token="def", + ), + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + ], + next_page_token="ghi", + ), + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.BackendBucketList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.BackendBucket) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_list_usable_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list_usable in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list_usable] = mock_rpc + + request = {} + client.list_usable(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list_usable(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_usable_rest_required_fields( + request_type=compute.ListUsableRegionBackendBucketsRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_usable._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_usable._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list_usable(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_usable_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list_usable._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_usable_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list_usable(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/listUsable" + % client.transport._host, + args[1], + ) + + +def test_list_usable_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_usable( + compute.ListUsableRegionBackendBucketsRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_usable_rest_pager(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + compute.BackendBucket(), + ], + next_page_token="abc", + ), + compute.BackendBucketListUsable( + items=[], + next_page_token="def", + ), + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + ], + next_page_token="ghi", + ), + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.BackendBucketListUsable.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list_usable(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.BackendBucket) for i in results) + + pages = list(client.list_usable(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucket", + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucket", + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc + + request = {} + client.set_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.set_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "regionSetPolicyRequestResource", + "resource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + region_set_policy_request_resource=compute.RegionSetPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + region_set_policy_request_resource=compute.RegionSetPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionBackendBucketsClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionBackendBucketsRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionBackendBucketsClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_delete_rest_bad_request(request_type=compute.DeleteRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionBackendBucketRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionBackendBucketRequest.pb( + compute.DeleteRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionBackendBucketRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket( + bucket_name="bucket_name_value", + compression_mode="compression_mode_value", + creation_timestamp="creation_timestamp_value", + custom_response_headers=["custom_response_headers_value"], + description="description_value", + edge_security_policy="edge_security_policy_value", + enable_cdn=True, + id=205, + kind="kind_value", + load_balancing_scheme="load_balancing_scheme_value", + name="name_value", + region="region_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.BackendBucket) + assert response.bucket_name == "bucket_name_value" + assert response.compression_mode == "compression_mode_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.custom_response_headers == ["custom_response_headers_value"] + assert response.description == "description_value" + assert response.edge_security_policy == "edge_security_policy_value" + assert response.enable_cdn is True + assert response.id == 205 + assert response.kind == "kind_value" + assert response.load_balancing_scheme == "load_balancing_scheme_value" + assert response.name == "name_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionBackendBucketRequest.pb( + compute.GetRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucket.to_json(compute.BackendBucket()) + req.return_value.content = return_value + + request = compute.GetRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucket() + post_with_metadata.return_value = compute.BackendBucket(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyRegionBackendBucketRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_get_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyRegionBackendBucketRequest.pb( + compute.GetIamPolicyRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request(request_type=compute.InsertRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionBackendBucketRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["backend_bucket_resource"] = { + "bucket_name": "bucket_name_value", + "cdn_policy": { + "bypass_cache_on_request_headers": [{"header_name": "header_name_value"}], + "cache_key_policy": { + "include_http_headers": [ + "include_http_headers_value1", + "include_http_headers_value2", + ], + "query_string_whitelist": [ + "query_string_whitelist_value1", + "query_string_whitelist_value2", + ], + }, + "cache_mode": "cache_mode_value", + "client_ttl": 1074, + "default_ttl": 1176, + "max_ttl": 761, + "negative_caching": True, + "negative_caching_policy": [{"code": 411, "ttl": 340}], + "request_coalescing": True, + "serve_while_stale": 1813, + "signed_url_cache_max_age_sec": 2890, + "signed_url_key_names": [ + "signed_url_key_names_value1", + "signed_url_key_names_value2", + ], + }, + "compression_mode": "compression_mode_value", + "creation_timestamp": "creation_timestamp_value", + "custom_response_headers": [ + "custom_response_headers_value1", + "custom_response_headers_value2", + ], + "description": "description_value", + "edge_security_policy": "edge_security_policy_value", + "enable_cdn": True, + "id": 205, + "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", + "name": "name_value", + "params": {"resource_manager_tags": {}}, + "region": "region_value", + "self_link": "self_link_value", + "used_by": [{"reference": "reference_value"}], + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionBackendBucketRequest.meta.fields[ + "backend_bucket_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "backend_bucket_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["backend_bucket_resource"][field])): + del request_init["backend_bucket_resource"][field][i][subfield] + else: + del request_init["backend_bucket_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionBackendBucketRequest.pb( + compute.InsertRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListRegionBackendBucketsRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionBackendBucketsRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionBackendBucketsRequest.pb( + compute.ListRegionBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketList.to_json(compute.BackendBucketList()) + req.return_value.content = return_value + + request = compute.ListRegionBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketList() + post_with_metadata.return_value = compute.BackendBucketList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_usable_rest_bad_request( + request_type=compute.ListUsableRegionBackendBucketsRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list_usable(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListUsableRegionBackendBucketsRequest, + dict, + ], +) +def test_list_usable_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list_usable(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListUsablePager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_usable_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_usable" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_usable_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_list_usable" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListUsableRegionBackendBucketsRequest.pb( + compute.ListUsableRegionBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketListUsable.to_json( + compute.BackendBucketListUsable() + ) + req.return_value.content = return_value + + request = compute.ListUsableRegionBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketListUsable() + post_with_metadata.return_value = compute.BackendBucketListUsable(), metadata + + client.list_usable( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request(request_type=compute.PatchRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionBackendBucketRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request_init["backend_bucket_resource"] = { + "bucket_name": "bucket_name_value", + "cdn_policy": { + "bypass_cache_on_request_headers": [{"header_name": "header_name_value"}], + "cache_key_policy": { + "include_http_headers": [ + "include_http_headers_value1", + "include_http_headers_value2", + ], + "query_string_whitelist": [ + "query_string_whitelist_value1", + "query_string_whitelist_value2", + ], + }, + "cache_mode": "cache_mode_value", + "client_ttl": 1074, + "default_ttl": 1176, + "max_ttl": 761, + "negative_caching": True, + "negative_caching_policy": [{"code": 411, "ttl": 340}], + "request_coalescing": True, + "serve_while_stale": 1813, + "signed_url_cache_max_age_sec": 2890, + "signed_url_key_names": [ + "signed_url_key_names_value1", + "signed_url_key_names_value2", + ], + }, + "compression_mode": "compression_mode_value", + "creation_timestamp": "creation_timestamp_value", + "custom_response_headers": [ + "custom_response_headers_value1", + "custom_response_headers_value2", + ], + "description": "description_value", + "edge_security_policy": "edge_security_policy_value", + "enable_cdn": True, + "id": 205, + "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", + "name": "name_value", + "params": {"resource_manager_tags": {}}, + "region": "region_value", + "self_link": "self_link_value", + "used_by": [{"reference": "reference_value"}], + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionBackendBucketRequest.meta.fields[ + "backend_bucket_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "backend_bucket_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["backend_bucket_resource"][field])): + del request_init["backend_bucket_resource"][field][i][subfield] + else: + del request_init["backend_bucket_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_patch_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionBackendBucketRequest.pb( + compute.PatchRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.set_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.SetIamPolicyRegionBackendBucketRequest, + dict, + ], +) +def test_set_iam_policy_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["region_set_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyRegionBackendBucketRequest.meta.fields[ + "region_set_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "region_set_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["region_set_policy_request_resource"][field]) + ): + del request_init["region_set_policy_request_resource"][field][i][ + subfield + ] + else: + del request_init["region_set_policy_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.set_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_set_iam_policy_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_set_iam_policy" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_set_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_set_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.SetIamPolicyRegionBackendBucketRequest.pb( + compute.SetIamPolicyRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.SetIamPolicyRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.set_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionBackendBucketRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.TestIamPermissionsRegionBackendBucketRequest.meta.fields[ + "test_permissions_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_test_iam_permissions" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_test_iam_permissions" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionBackendBucketRequest.pb( + compute.TestIamPermissionsRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionBackendBucketsRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_usable_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list_usable), "__call__") as call: + client.list_usable(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListUsableRegionBackendBucketsRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionBackendBucketRequest() + + assert args[0] == request_msg + + +def test_region_backend_buckets_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionBackendBucketsTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_backend_buckets_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionBackendBucketsTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "delete", + "get", + "get_iam_policy", + "insert", + "list", + "list_usable", + "patch", + "set_iam_policy", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_backend_buckets_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionBackendBucketsTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_backend_buckets_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionBackendBucketsTransport() + adc.assert_called_once() + + +def test_region_backend_buckets_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionBackendBucketsClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_backend_buckets_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionBackendBucketsRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_host_no_port(transport_name): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_host_with_port(transport_name): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionBackendBucketsClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionBackendBucketsClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.list_usable._session + session2 = client2.transport.list_usable._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionBackendBucketsClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionBackendBucketsClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionBackendBucketsClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionBackendBucketsClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionBackendBucketsClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionBackendBucketsClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionBackendBucketsClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionBackendBucketsClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionBackendBucketsClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionBackendBucketsClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionBackendBucketsTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionBackendBucketsTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionBackendBucketsClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RegionBackendBucketsClient, transports.RegionBackendBucketsRestTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py index 1176bc67d9d8..30ad2a1c59ca 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py @@ -5750,6 +5750,7 @@ def test_insert_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -6463,6 +6464,7 @@ def test_patch_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -7623,6 +7625,7 @@ def test_update_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py new file mode 100644 index 000000000000..e9638ac797b9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py @@ -0,0 +1,5203 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_composite_health_checks import ( + RegionCompositeHealthChecksClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RegionCompositeHealthChecksClient._get_default_mtls_endpoint(None) is None + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + RegionCompositeHealthChecksClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionCompositeHealthChecksClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source(None, False) is None + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionCompositeHealthChecksClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionCompositeHealthChecksClient._get_universe_domain( + None, universe_domain_env + ) + == universe_domain_env + ) + assert ( + RegionCompositeHealthChecksClient._get_universe_domain(None, None) + == RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionCompositeHealthChecksClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionCompositeHealthChecksClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionCompositeHealthChecksClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionCompositeHealthChecksClient, "rest"), + ], +) +def test_region_composite_health_checks_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionCompositeHealthChecksRestTransport, "rest"), + ], +) +def test_region_composite_health_checks_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionCompositeHealthChecksClient, "rest"), + ], +) +def test_region_composite_health_checks_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_composite_health_checks_client_get_transport_class(): + transport = RegionCompositeHealthChecksClient.get_transport_class() + available_transports = [ + transports.RegionCompositeHealthChecksRestTransport, + ] + assert transport in available_transports + + transport = RegionCompositeHealthChecksClient.get_transport_class("rest") + assert transport == transports.RegionCompositeHealthChecksRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + RegionCompositeHealthChecksClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + RegionCompositeHealthChecksClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + "true", + ), + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_composite_health_checks_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionCompositeHealthChecksClient]) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + +@pytest.mark.parametrize("client_class", [RegionCompositeHealthChecksClient]) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + ), + ], +) +def test_region_composite_health_checks_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + None, + ), + ], +) +def test_region_composite_health_checks_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListRegionCompositeHealthChecksRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListRegionCompositeHealthChecksRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.CompositeHealthCheckAggregatedList( + items={ + "a": compute.CompositeHealthChecksScopedList(), + "b": compute.CompositeHealthChecksScopedList(), + "c": compute.CompositeHealthChecksScopedList(), + }, + next_page_token="abc", + ), + compute.CompositeHealthCheckAggregatedList( + items={}, + next_page_token="def", + ), + compute.CompositeHealthCheckAggregatedList( + items={ + "g": compute.CompositeHealthChecksScopedList(), + }, + next_page_token="ghi", + ), + compute.CompositeHealthCheckAggregatedList( + items={ + "h": compute.CompositeHealthChecksScopedList(), + "i": compute.CompositeHealthChecksScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.CompositeHealthCheckAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.CompositeHealthChecksScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.CompositeHealthChecksScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.CompositeHealthChecksScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionCompositeHealthChecksRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionCompositeHealthChecksRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + ], + next_page_token="abc", + ), + compute.CompositeHealthCheckList( + items=[], + next_page_token="def", + ), + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + ], + next_page_token="ghi", + ), + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.CompositeHealthCheckList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.CompositeHealthCheck) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionCompositeHealthChecksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionCompositeHealthChecksClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListRegionCompositeHealthChecksRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListRegionCompositeHealthChecksRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListRegionCompositeHealthChecksRequest.pb( + compute.AggregatedListRegionCompositeHealthChecksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheckAggregatedList.to_json( + compute.CompositeHealthCheckAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListRegionCompositeHealthChecksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheckAggregatedList() + post_with_metadata.return_value = ( + compute.CompositeHealthCheckAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_delete_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionCompositeHealthCheckRequest.pb( + compute.DeleteRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request( + request_type=compute.GetRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value", + description="description_value", + fingerprint="fingerprint_value", + health_destination="health_destination_value", + health_sources=["health_sources_value"], + id=205, + kind="kind_value", + name="name_value", + region="region_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.CompositeHealthCheck) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.fingerprint == "fingerprint_value" + assert response.health_destination == "health_destination_value" + assert response.health_sources == ["health_sources_value"] + assert response.id == 205 + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionCompositeHealthCheckRequest.pb( + compute.GetRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheck.to_json( + compute.CompositeHealthCheck() + ) + req.return_value.content = return_value + + request = compute.GetRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheck() + post_with_metadata.return_value = compute.CompositeHealthCheck(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["composite_health_check_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "health_destination": "health_destination_value", + "health_sources": ["health_sources_value1", "health_sources_value2"], + "id": 205, + "kind": "kind_value", + "name": "name_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionCompositeHealthCheckRequest.meta.fields[ + "composite_health_check_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "composite_health_check_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["composite_health_check_resource"][field]) + ): + del request_init["composite_health_check_resource"][field][i][ + subfield + ] + else: + del request_init["composite_health_check_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_insert_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionCompositeHealthCheckRequest.pb( + compute.InsertRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request( + request_type=compute.ListRegionCompositeHealthChecksRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionCompositeHealthChecksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionCompositeHealthChecksRequest.pb( + compute.ListRegionCompositeHealthChecksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheckList.to_json( + compute.CompositeHealthCheckList() + ) + req.return_value.content = return_value + + request = compute.ListRegionCompositeHealthChecksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheckList() + post_with_metadata.return_value = compute.CompositeHealthCheckList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request_init["composite_health_check_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "health_destination": "health_destination_value", + "health_sources": ["health_sources_value1", "health_sources_value2"], + "id": 205, + "kind": "kind_value", + "name": "name_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionCompositeHealthCheckRequest.meta.fields[ + "composite_health_check_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "composite_health_check_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["composite_health_check_resource"][field]) + ): + del request_init["composite_health_check_resource"][field][i][ + subfield + ] + else: + del request_init["composite_health_check_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_patch_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionCompositeHealthCheckRequest.pb( + compute.PatchRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = ( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest.meta.fields[ + "test_permissions_request_resource" + ] + ) + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_test_iam_permissions", + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "pre_test_iam_permissions", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionCompositeHealthCheckRequest.pb( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListRegionCompositeHealthChecksRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionCompositeHealthChecksRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +def test_region_composite_health_checks_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionCompositeHealthChecksTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_composite_health_checks_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionCompositeHealthChecksTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "delete", + "get", + "insert", + "list", + "patch", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_composite_health_checks_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionCompositeHealthChecksTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_composite_health_checks_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionCompositeHealthChecksTransport() + adc.assert_called_once() + + +def test_region_composite_health_checks_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionCompositeHealthChecksClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_composite_health_checks_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionCompositeHealthChecksRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_host_no_port(transport_name): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_host_with_port(transport_name): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionCompositeHealthChecksClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionCompositeHealthChecksClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionCompositeHealthChecksClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionCompositeHealthChecksClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionCompositeHealthChecksClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionCompositeHealthChecksClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionCompositeHealthChecksClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionCompositeHealthChecksClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionCompositeHealthChecksClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionCompositeHealthChecksClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionCompositeHealthChecksClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionCompositeHealthChecksClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionCompositeHealthChecksTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionCompositeHealthChecksTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionCompositeHealthChecksClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py new file mode 100644 index 000000000000..806fd2bef8a9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py @@ -0,0 +1,5251 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_health_aggregation_policies import ( + RegionHealthAggregationPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(None) is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + api_mtls_endpoint + ) + == api_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + sandbox_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + RegionHealthAggregationPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionHealthAggregationPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source(None, False) + is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + None, True + ) + is mock_default_cert_source + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + ) + + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + None, universe_domain_env + ) + == universe_domain_env + ) + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain(None, None) + == RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionHealthAggregationPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionHealthAggregationPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionHealthAggregationPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionHealthAggregationPoliciesClient, "rest"), + ], +) +def test_region_health_aggregation_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionHealthAggregationPoliciesRestTransport, "rest"), + ], +) +def test_region_health_aggregation_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionHealthAggregationPoliciesClient, "rest"), + ], +) +def test_region_health_aggregation_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_health_aggregation_policies_client_get_transport_class(): + transport = RegionHealthAggregationPoliciesClient.get_transport_class() + available_transports = [ + transports.RegionHealthAggregationPoliciesRestTransport, + ] + assert transport in available_transports + + transport = RegionHealthAggregationPoliciesClient.get_transport_class("rest") + assert transport == transports.RegionHealthAggregationPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + RegionHealthAggregationPoliciesClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + RegionHealthAggregationPoliciesClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + "true", + ), + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_health_aggregation_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionHealthAggregationPoliciesClient]) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + +@pytest.mark.parametrize("client_class", [RegionHealthAggregationPoliciesClient]) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + ), + ], +) +def test_region_health_aggregation_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_region_health_aggregation_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListRegionHealthAggregationPoliciesRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListRegionHealthAggregationPoliciesRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.HealthAggregationPolicyAggregatedList( + items={ + "a": compute.HealthAggregationPoliciesScopedList(), + "b": compute.HealthAggregationPoliciesScopedList(), + "c": compute.HealthAggregationPoliciesScopedList(), + }, + next_page_token="abc", + ), + compute.HealthAggregationPolicyAggregatedList( + items={}, + next_page_token="def", + ), + compute.HealthAggregationPolicyAggregatedList( + items={ + "g": compute.HealthAggregationPoliciesScopedList(), + }, + next_page_token="ghi", + ), + compute.HealthAggregationPolicyAggregatedList( + items={ + "h": compute.HealthAggregationPoliciesScopedList(), + "i": compute.HealthAggregationPoliciesScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.HealthAggregationPolicyAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.HealthAggregationPoliciesScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.HealthAggregationPoliciesScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.HealthAggregationPoliciesScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionHealthAggregationPoliciesRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionHealthAggregationPoliciesRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + ], + next_page_token="abc", + ), + compute.HealthAggregationPolicyList( + items=[], + next_page_token="def", + ), + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + ], + next_page_token="ghi", + ), + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.HealthAggregationPolicyList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.HealthAggregationPolicy) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionHealthAggregationPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionHealthAggregationPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListRegionHealthAggregationPoliciesRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListRegionHealthAggregationPoliciesRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_aggregated_list", + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListRegionHealthAggregationPoliciesRequest.pb( + compute.AggregatedListRegionHealthAggregationPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicyAggregatedList.to_json( + compute.HealthAggregationPolicyAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListRegionHealthAggregationPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicyAggregatedList() + post_with_metadata.return_value = ( + compute.HealthAggregationPolicyAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_delete_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionHealthAggregationPolicyRequest.pb( + compute.DeleteRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request( + request_type=compute.GetRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + fingerprint="fingerprint_value", + healthy_percent_threshold=2667, + id=205, + kind="kind_value", + min_healthy_threshold=2238, + name="name_value", + policy_type="policy_type_value", + region="region_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.HealthAggregationPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.fingerprint == "fingerprint_value" + assert response.healthy_percent_threshold == 2667 + assert response.id == 205 + assert response.kind == "kind_value" + assert response.min_healthy_threshold == 2238 + assert response.name == "name_value" + assert response.policy_type == "policy_type_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_get_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionHealthAggregationPolicyRequest.pb( + compute.GetRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicy.to_json( + compute.HealthAggregationPolicy() + ) + req.return_value.content = return_value + + request = compute.GetRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicy() + post_with_metadata.return_value = compute.HealthAggregationPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["health_aggregation_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "healthy_percent_threshold": 2667, + "id": 205, + "kind": "kind_value", + "min_healthy_threshold": 2238, + "name": "name_value", + "policy_type": "policy_type_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionHealthAggregationPolicyRequest.meta.fields[ + "health_aggregation_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "health_aggregation_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["health_aggregation_policy_resource"][field]) + ): + del request_init["health_aggregation_policy_resource"][field][i][ + subfield + ] + else: + del request_init["health_aggregation_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_insert_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionHealthAggregationPolicyRequest.pb( + compute.InsertRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request( + request_type=compute.ListRegionHealthAggregationPoliciesRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionHealthAggregationPoliciesRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionHealthAggregationPoliciesRequest.pb( + compute.ListRegionHealthAggregationPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicyList.to_json( + compute.HealthAggregationPolicyList() + ) + req.return_value.content = return_value + + request = compute.ListRegionHealthAggregationPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicyList() + post_with_metadata.return_value = ( + compute.HealthAggregationPolicyList(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request_init["health_aggregation_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "healthy_percent_threshold": 2667, + "id": 205, + "kind": "kind_value", + "min_healthy_threshold": 2238, + "name": "name_value", + "policy_type": "policy_type_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionHealthAggregationPolicyRequest.meta.fields[ + "health_aggregation_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "health_aggregation_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["health_aggregation_policy_resource"][field]) + ): + del request_init["health_aggregation_policy_resource"][field][i][ + subfield + ] + else: + del request_init["health_aggregation_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_patch_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionHealthAggregationPolicyRequest.pb( + compute.PatchRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = ( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.meta.fields[ + "test_permissions_request_resource" + ] + ) + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_test_iam_permissions", + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "pre_test_iam_permissions", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.pb( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListRegionHealthAggregationPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionHealthAggregationPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +def test_region_health_aggregation_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_health_aggregation_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "delete", + "get", + "insert", + "list", + "patch", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_health_aggregation_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_health_aggregation_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionHealthAggregationPoliciesTransport() + adc.assert_called_once() + + +def test_region_health_aggregation_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionHealthAggregationPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_health_aggregation_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionHealthAggregationPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_host_no_port(transport_name): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_host_with_port(transport_name): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionHealthAggregationPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionHealthAggregationPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionHealthAggregationPoliciesClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionHealthAggregationPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_billing_account_path( + path + ) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionHealthAggregationPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionHealthAggregationPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionHealthAggregationPoliciesClient.common_organization_path( + organization + ) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionHealthAggregationPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionHealthAggregationPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionHealthAggregationPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionHealthAggregationPoliciesClient.common_location_path( + project, location + ) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionHealthAggregationPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionHealthAggregationPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionHealthAggregationPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionHealthAggregationPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py index 2c8d8fe92287..be3fd2ddcae0 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py @@ -3352,6 +3352,7 @@ def test_aggregated_list_rest_call_success(request_type): kind="kind_value", next_page_token="next_page_token_value", self_link="self_link_value", + unreachables=["unreachables_value"], ) # Wrap the value into a proper Response obj @@ -3372,6 +3373,7 @@ def test_aggregated_list_rest_call_success(request_type): assert response.kind == "kind_value" assert response.next_page_token == "next_page_token_value" assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py index feec31c43ea4..b1ee95f5706a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py @@ -1191,6 +1191,219 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + + def test_list_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -1935,89 +2148,947 @@ def test_perform_maintenance_unary_rest_flattened_error(transport: str = "rest") ) -def test_credentials_transport_error(): - # It is an error to provide credentials and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), - transport=transport, + transport="rest", ) - # It is an error to provide a credentials file and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options={"credentials_file": "credentials.json"}, - transport=transport, - ) + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() - # It is an error to provide an api_key and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options=options, - transport=transport, - ) + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods - # It is an error to provide an api_key and a credential. - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options=options, credentials=ga_credentials.AnonymousCredentials() + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc - # It is an error to provide scopes and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options={"scopes": ["1", "2"]}, - transport=transport, - ) + request = {} + client.set_iam_policy(request) + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 -def test_transport_instance(): - # A client may be instantiated with a custom transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - client = ReservationBlocksClient(transport=transport) - assert client.transport is transport + client.set_iam_policy(request) + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 -@pytest.mark.parametrize( - "transport_class", - [ - transports.ReservationBlocksRestTransport, - ], -) -def test_transport_adc(transport_class): - # Test default credentials are used if not provided. - with mock.patch.object(google.auth, "default") as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class() - adc.assert_called_once() +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport -def test_transport_kind_rest(): - transport = ReservationBlocksClient.get_transport_class("rest")( + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + "zoneSetNestedPolicyRequestResource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "testPermissionsRequestResource", + "zone", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ReservationBlocksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ReservationBlocksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = ReservationBlocksClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "reservation": "sample3", + "reservation_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetReservationBlockRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "reservation": "sample3", + "reservation_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationBlocksGetResponse() + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationBlocksGetResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.ReservationBlocksGetResponse) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), + ) + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetReservationBlockRequest.pb( + compute.GetReservationBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationBlocksGetResponse.to_json( + compute.ReservationBlocksGetResponse() + ) + req.return_value.content = return_value + + request = compute.GetReservationBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationBlocksGetResponse() + post_with_metadata.return_value = ( + compute.ReservationBlocksGetResponse(), + metadata, + ) + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyReservationBlockRequest, +): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyReservationBlockRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), + ) + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_iam_policy_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyReservationBlockRequest.pb( + compute.GetIamPolicyReservationBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyReservationBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListReservationBlocksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationBlocksListResponse( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationBlocksListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), ) - assert transport.kind == "rest" + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListReservationBlocksRequest.pb( + compute.ListReservationBlocksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationBlocksListResponse.to_json( + compute.ReservationBlocksListResponse() + ) + req.return_value.content = return_value -def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): + request = compute.ListReservationBlocksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationBlocksListResponse() + post_with_metadata.return_value = ( + compute.ReservationBlocksListResponse(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_perform_maintenance_rest_bad_request( + request_type=compute.PerformMaintenanceReservationBlockRequest, +): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2042,17 +3113,17 @@ def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.get(request) + client.perform_maintenance(request) @pytest.mark.parametrize( "request_type", [ - compute.GetReservationBlockRequest, + compute.PerformMaintenanceReservationBlockRequest, dict, ], ) -def test_get_rest_call_success(request_type): +def test_perform_maintenance_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2064,31 +3135,161 @@ def test_get_rest_call_success(request_type): "reservation": "sample3", "reservation_block": "sample4", } + request_init["reservations_blocks_perform_maintenance_request_resource"] = { + "maintenance_scope": "maintenance_scope_value" + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PerformMaintenanceReservationBlockRequest.meta.fields[ + "reservations_blocks_perform_maintenance_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field] + ), + ): + del request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field][i][subfield] + else: + del request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationBlocksGetResponse() + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationBlocksGetResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.get(request) + response = client.perform_maintenance(request) # Establish that the response is the type that we expect. - assert isinstance(response, compute.ReservationBlocksGetResponse) + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_get_rest_interceptors(null_interceptor): +def test_perform_maintenance_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2102,17 +3303,18 @@ def test_get_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_get" + transports.ReservationBlocksRestInterceptor, "post_perform_maintenance" ) as post, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_get_with_metadata" + transports.ReservationBlocksRestInterceptor, + "post_perform_maintenance_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_get" + transports.ReservationBlocksRestInterceptor, "pre_perform_maintenance" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.GetReservationBlockRequest.pb( - compute.GetReservationBlockRequest() + pb_message = compute.PerformMaintenanceReservationBlockRequest.pb( + compute.PerformMaintenanceReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2124,24 +3326,19 @@ def test_get_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationBlocksGetResponse.to_json( - compute.ReservationBlocksGetResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.GetReservationBlockRequest() + request = compute.PerformMaintenanceReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationBlocksGetResponse() - post_with_metadata.return_value = ( - compute.ReservationBlocksGetResponse(), - metadata, - ) + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.get( + client.perform_maintenance( request, metadata=[ ("key", "val"), @@ -2154,12 +3351,19 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest): +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyReservationBlockRequest, +): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -2174,33 +3378,156 @@ def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list(request) + client.set_iam_policy(request) @pytest.mark.parametrize( "request_type", [ - compute.ListReservationBlocksRequest, + compute.SetIamPolicyReservationBlockRequest, dict, ], ) -def test_list_rest_call_success(request_type): +def test_set_iam_policy_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request_init["zone_set_nested_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyReservationBlockRequest.meta.fields[ + "zone_set_nested_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "zone_set_nested_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len(request_init["zone_set_nested_policy_request_resource"][field]), + ): + del request_init["zone_set_nested_policy_request_resource"][field][ + i + ][subfield] + else: + del request_init["zone_set_nested_policy_request_resource"][field][ + subfield + ] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationBlocksListResponse( - id="id_value", - kind="kind_value", - next_page_token="next_page_token_value", - self_link="self_link_value", + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, ) # Wrap the value into a proper Response obj @@ -2208,23 +3535,22 @@ def test_list_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationBlocksListResponse.pb(return_value) + return_value = compute.Policy.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list(request) + response = client.set_iam_policy(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListPager) - assert response.id == "id_value" - assert response.kind == "kind_value" - assert response.next_page_token == "next_page_token_value" - assert response.self_link == "self_link_value" + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_rest_interceptors(null_interceptor): +def test_set_iam_policy_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2238,17 +3564,17 @@ def test_list_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_list" + transports.ReservationBlocksRestInterceptor, "post_set_iam_policy" ) as post, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_list_with_metadata" + transports.ReservationBlocksRestInterceptor, "post_set_iam_policy_with_metadata" ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_list" + transports.ReservationBlocksRestInterceptor, "pre_set_iam_policy" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ListReservationBlocksRequest.pb( - compute.ListReservationBlocksRequest() + pb_message = compute.SetIamPolicyReservationBlockRequest.pb( + compute.SetIamPolicyReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2260,24 +3586,19 @@ def test_list_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationBlocksListResponse.to_json( - compute.ReservationBlocksListResponse() - ) + return_value = compute.Policy.to_json(compute.Policy()) req.return_value.content = return_value - request = compute.ListReservationBlocksRequest() + request = compute.SetIamPolicyReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationBlocksListResponse() - post_with_metadata.return_value = ( - compute.ReservationBlocksListResponse(), - metadata, - ) + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata - client.list( + client.set_iam_policy( request, metadata=[ ("key", "val"), @@ -2290,8 +3611,8 @@ def test_list_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_perform_maintenance_rest_bad_request( - request_type=compute.PerformMaintenanceReservationBlockRequest, +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsReservationBlockRequest, ): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -2300,8 +3621,8 @@ def test_perform_maintenance_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "reservation": "sample3", - "reservation_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -2317,17 +3638,17 @@ def test_perform_maintenance_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.perform_maintenance(request) + client.test_iam_permissions(request) @pytest.mark.parametrize( "request_type", [ - compute.PerformMaintenanceReservationBlockRequest, + compute.TestIamPermissionsReservationBlockRequest, dict, ], ) -def test_perform_maintenance_rest_call_success(request_type): +def test_test_iam_permissions_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2336,19 +3657,19 @@ def test_perform_maintenance_rest_call_success(request_type): request_init = { "project": "sample1", "zone": "sample2", - "reservation": "sample3", - "reservation_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } - request_init["reservations_blocks_perform_maintenance_request_resource"] = { - "maintenance_scope": "maintenance_scope_value" + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency # See https://github.com/googleapis/gapic-generator-python/issues/1748 # Determine if the message type is proto-plus or protobuf - test_field = compute.PerformMaintenanceReservationBlockRequest.meta.fields[ - "reservations_blocks_perform_maintenance_request_resource" + test_field = compute.TestIamPermissionsReservationBlockRequest.meta.fields[ + "test_permissions_request_resource" ] def get_message_fields(field): @@ -2378,7 +3699,7 @@ def get_message_fields(field): # For each item in the sample request, create a list of sub fields which are not present at runtime # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime for field, value in request_init[ - "reservations_blocks_perform_maintenance_request_resource" + "test_permissions_request_resource" ].items(): # pragma: NO COVER result = None is_repeated = False @@ -2410,48 +3731,20 @@ def get_message_fields(field): if subfield: if field_repeated: for i in range( - 0, - len( - request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field] - ), + 0, len(request_init["test_permissions_request_resource"][field]) ): - del request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field][i][subfield] + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] else: - del request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field][subfield] + del request_init["test_permissions_request_resource"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], ) # Wrap the value into a proper Response obj @@ -2459,41 +3752,20 @@ def get_message_fields(field): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.perform_maintenance(request) + response = client.test_iam_permissions(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_perform_maintenance_rest_interceptors(null_interceptor): +def test_test_iam_permissions_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2507,18 +3779,18 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_perform_maintenance" + transports.ReservationBlocksRestInterceptor, "post_test_iam_permissions" ) as post, mock.patch.object( transports.ReservationBlocksRestInterceptor, - "post_perform_maintenance_with_metadata", + "post_test_iam_permissions_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_perform_maintenance" + transports.ReservationBlocksRestInterceptor, "pre_test_iam_permissions" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.PerformMaintenanceReservationBlockRequest.pb( - compute.PerformMaintenanceReservationBlockRequest() + pb_message = compute.TestIamPermissionsReservationBlockRequest.pb( + compute.TestIamPermissionsReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2530,19 +3802,21 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) req.return_value.content = return_value - request = compute.PerformMaintenanceReservationBlockRequest() + request = compute.TestIamPermissionsReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata - client.perform_maintenance( + client.test_iam_permissions( request, metadata=[ ("key", "val"), @@ -2582,6 +3856,26 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyReservationBlockRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_list_empty_call_rest(): @@ -2624,6 +3918,48 @@ def test_perform_maintenance_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyReservationBlockRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsReservationBlockRequest() + + assert args[0] == request_msg + + def test_reservation_blocks_base_transport_error(): # Passing both a credentials object and credentials_file should raise an error with pytest.raises(core_exceptions.DuplicateCredentialArgs): @@ -2647,8 +3983,11 @@ def test_reservation_blocks_base_transport(): # raise NotImplementedError. methods = ( "get", + "get_iam_policy", "list", "perform_maintenance", + "set_iam_policy", + "test_iam_permissions", ) for method in methods: with pytest.raises(NotImplementedError): @@ -2789,12 +4128,21 @@ def test_reservation_blocks_client_transport_session_collision(transport_name): session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 session1 = client1.transport.list._session session2 = client2.transport.list._session assert session1 != session2 session1 = client1.transport.perform_maintenance._session session2 = client2.transport.perform_maintenance._session assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 def test_common_billing_account_path(): diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py index b7e890a511f6..797a58a57da4 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py @@ -1061,6 +1061,8 @@ def test_get_rest_required_fields(request_type=compute.GetReservationSubBlockReq unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() ).get._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("view",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -1122,7 +1124,7 @@ def test_get_rest_unset_required_fields(): unset_fields = transport.get._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("view",)) & set( ( "parentName", @@ -1203,6 +1205,219 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + + def test_list_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -2383,89 +2598,948 @@ def test_report_faulty_unary_rest_flattened_error(transport: str = "rest"): ) -def test_credentials_transport_error(): - # It is an error to provide credentials and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), - transport=transport, + transport="rest", ) - # It is an error to provide a credentials file and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options={"credentials_file": "credentials.json"}, - transport=transport, - ) + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() - # It is an error to provide an api_key and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options=options, - transport=transport, - ) + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods - # It is an error to provide an api_key and a credential. - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options=options, credentials=ga_credentials.AnonymousCredentials() + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc - # It is an error to provide scopes and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options={"scopes": ["1", "2"]}, - transport=transport, - ) + request = {} + client.set_iam_policy(request) + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 -def test_transport_instance(): - # A client may be instantiated with a custom transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - client = ReservationSubBlocksClient(transport=transport) - assert client.transport is transport + client.set_iam_policy(request) + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 -@pytest.mark.parametrize( - "transport_class", - [ - transports.ReservationSubBlocksRestTransport, - ], -) -def test_transport_adc(transport_class): - # Test default credentials are used if not provided. - with mock.patch.object(google.auth, "default") as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class() - adc.assert_called_once() + +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + "zoneSetNestedPolicyRequestResource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "testPermissionsRequestResource", + "zone", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ReservationSubBlocksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ReservationSubBlocksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() def test_transport_kind_rest(): transport = ReservationSubBlocksClient.get_transport_class("rest")( credentials=ga_credentials.AnonymousCredentials() ) - assert transport.kind == "rest" + assert transport.kind == "rest" + + +def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetReservationSubBlockRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationSubBlocksGetResponse() + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationSubBlocksGetResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.ReservationSubBlocksGetResponse) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetReservationSubBlockRequest.pb( + compute.GetReservationSubBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationSubBlocksGetResponse.to_json( + compute.ReservationSubBlocksGetResponse() + ) + req.return_value.content = return_value + + request = compute.GetReservationSubBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationSubBlocksGetResponse() + post_with_metadata.return_value = ( + compute.ReservationSubBlocksGetResponse(), + metadata, + ) + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyReservationSubBlockRequest, +): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyReservationSubBlockRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, + "post_get_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyReservationSubBlockRequest.pb( + compute.GetIamPolicyReservationSubBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyReservationSubBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequest): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) -def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest): +@pytest.mark.parametrize( + "request_type", + [ + compute.ListReservationSubBlocksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationSubBlocksListResponse( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationSubBlocksListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListReservationSubBlocksRequest.pb( + compute.ListReservationSubBlocksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationSubBlocksListResponse.to_json( + compute.ReservationSubBlocksListResponse() + ) + req.return_value.content = return_value + + request = compute.ListReservationSubBlocksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationSubBlocksListResponse() + post_with_metadata.return_value = ( + compute.ReservationSubBlocksListResponse(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_perform_maintenance_rest_bad_request( + request_type=compute.PerformMaintenanceReservationSubBlockRequest, +): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2490,17 +3564,17 @@ def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.get(request) + client.perform_maintenance(request) @pytest.mark.parametrize( "request_type", [ - compute.GetReservationSubBlockRequest, + compute.PerformMaintenanceReservationSubBlockRequest, dict, ], ) -def test_get_rest_call_success(request_type): +def test_perform_maintenance_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2517,26 +3591,71 @@ def test_get_rest_call_success(request_type): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationSubBlocksGetResponse() + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationSubBlocksGetResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.get(request) + response = client.perform_maintenance(request) # Establish that the response is the type that we expect. - assert isinstance(response, compute.ReservationSubBlocksGetResponse) + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_get_rest_interceptors(null_interceptor): +def test_perform_maintenance_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2550,17 +3669,18 @@ def test_get_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_get" + transports.ReservationSubBlocksRestInterceptor, "post_perform_maintenance" ) as post, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_get_with_metadata" + transports.ReservationSubBlocksRestInterceptor, + "post_perform_maintenance_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_get" + transports.ReservationSubBlocksRestInterceptor, "pre_perform_maintenance" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.GetReservationSubBlockRequest.pb( - compute.GetReservationSubBlockRequest() + pb_message = compute.PerformMaintenanceReservationSubBlockRequest.pb( + compute.PerformMaintenanceReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -2572,24 +3692,19 @@ def test_get_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationSubBlocksGetResponse.to_json( - compute.ReservationSubBlocksGetResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.GetReservationSubBlockRequest() + request = compute.PerformMaintenanceReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), - ] - pre.return_value = request, metadata - post.return_value = compute.ReservationSubBlocksGetResponse() - post_with_metadata.return_value = ( - compute.ReservationSubBlocksGetResponse(), - metadata, - ) + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.get( + client.perform_maintenance( request, metadata=[ ("key", "val"), @@ -2602,12 +3717,19 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequest): +def test_report_faulty_rest_bad_request( + request_type=compute.ReportFaultyReservationSubBlockRequest, +): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -2622,33 +3744,145 @@ def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequ response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list(request) + client.report_faulty(request) @pytest.mark.parametrize( "request_type", [ - compute.ListReservationSubBlocksRequest, + compute.ReportFaultyReservationSubBlockRequest, dict, ], ) -def test_list_rest_call_success(request_type): +def test_report_faulty_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request_init["reservation_sub_blocks_report_faulty_request_resource"] = { + "disruption_schedule": "disruption_schedule_value", + "failure_component": "failure_component_value", + "fault_reasons": [ + {"behavior": "behavior_value", "description": "description_value"} + ], + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.ReportFaultyReservationSubBlockRequest.meta.fields[ + "reservation_sub_blocks_report_faulty_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field] + ), + ): + del request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field][i][subfield] + else: + del request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationSubBlocksListResponse( - id="id_value", + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", kind="kind_value", - next_page_token="next_page_token_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", ) # Wrap the value into a proper Response obj @@ -2656,23 +3890,41 @@ def test_list_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationSubBlocksListResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list(request) + response = client.report_faulty(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListPager) - assert response.id == "id_value" + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" assert response.kind == "kind_value" - assert response.next_page_token == "next_page_token_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_rest_interceptors(null_interceptor): +def test_report_faulty_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2686,17 +3938,18 @@ def test_list_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_list" + transports.ReservationSubBlocksRestInterceptor, "post_report_faulty" ) as post, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_list_with_metadata" + transports.ReservationSubBlocksRestInterceptor, + "post_report_faulty_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_list" + transports.ReservationSubBlocksRestInterceptor, "pre_report_faulty" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ListReservationSubBlocksRequest.pb( - compute.ListReservationSubBlocksRequest() + pb_message = compute.ReportFaultyReservationSubBlockRequest.pb( + compute.ReportFaultyReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -2708,24 +3961,19 @@ def test_list_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationSubBlocksListResponse.to_json( - compute.ReservationSubBlocksListResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.ListReservationSubBlocksRequest() + request = compute.ReportFaultyReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationSubBlocksListResponse() - post_with_metadata.return_value = ( - compute.ReservationSubBlocksListResponse(), - metadata, - ) + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.list( + client.report_faulty( request, metadata=[ ("key", "val"), @@ -2738,8 +3986,8 @@ def test_list_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_perform_maintenance_rest_bad_request( - request_type=compute.PerformMaintenanceReservationSubBlockRequest, +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyReservationSubBlockRequest, ): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -2748,8 +3996,8 @@ def test_perform_maintenance_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -2765,56 +4013,156 @@ def test_perform_maintenance_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.perform_maintenance(request) + client.set_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.SetIamPolicyReservationSubBlockRequest, + dict, + ], +) +def test_set_iam_policy_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request_init["zone_set_nested_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyReservationSubBlockRequest.meta.fields[ + "zone_set_nested_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "zone_set_nested_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value -@pytest.mark.parametrize( - "request_type", - [ - compute.PerformMaintenanceReservationSubBlockRequest, - dict, - ], -) -def test_perform_maintenance_rest_call_success(request_type): - client = ReservationSubBlocksClient( - credentials=ga_credentials.AnonymousCredentials(), transport="rest" - ) + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) - # send a request that will satisfy transcoding - request_init = { - "project": "sample1", - "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", - } + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len(request_init["zone_set_nested_policy_request_resource"][field]), + ): + del request_init["zone_set_nested_policy_request_resource"][field][ + i + ][subfield] + else: + del request_init["zone_set_nested_policy_request_resource"][field][ + subfield + ] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, ) # Wrap the value into a proper Response obj @@ -2822,41 +4170,22 @@ def test_perform_maintenance_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.Policy.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.perform_maintenance(request) + response = client.set_iam_policy(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_perform_maintenance_rest_interceptors(null_interceptor): +def test_set_iam_policy_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2870,18 +4199,18 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_perform_maintenance" + transports.ReservationSubBlocksRestInterceptor, "post_set_iam_policy" ) as post, mock.patch.object( transports.ReservationSubBlocksRestInterceptor, - "post_perform_maintenance_with_metadata", + "post_set_iam_policy_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_perform_maintenance" + transports.ReservationSubBlocksRestInterceptor, "pre_set_iam_policy" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.PerformMaintenanceReservationSubBlockRequest.pb( - compute.PerformMaintenanceReservationSubBlockRequest() + pb_message = compute.SetIamPolicyReservationSubBlockRequest.pb( + compute.SetIamPolicyReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -2893,19 +4222,19 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.Policy.to_json(compute.Policy()) req.return_value.content = return_value - request = compute.PerformMaintenanceReservationSubBlockRequest() + request = compute.SetIamPolicyReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata - client.perform_maintenance( + client.set_iam_policy( request, metadata=[ ("key", "val"), @@ -2918,8 +4247,8 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_report_faulty_rest_bad_request( - request_type=compute.ReportFaultyReservationSubBlockRequest, +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsReservationSubBlockRequest, ): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -2928,8 +4257,8 @@ def test_report_faulty_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -2945,17 +4274,17 @@ def test_report_faulty_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.report_faulty(request) + client.test_iam_permissions(request) @pytest.mark.parametrize( "request_type", [ - compute.ReportFaultyReservationSubBlockRequest, + compute.TestIamPermissionsReservationSubBlockRequest, dict, ], ) -def test_report_faulty_rest_call_success(request_type): +def test_test_iam_permissions_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2964,23 +4293,19 @@ def test_report_faulty_rest_call_success(request_type): request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } - request_init["reservation_sub_blocks_report_faulty_request_resource"] = { - "disruption_schedule": "disruption_schedule_value", - "failure_component": "failure_component_value", - "fault_reasons": [ - {"behavior": "behavior_value", "description": "description_value"} - ], + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency # See https://github.com/googleapis/gapic-generator-python/issues/1748 # Determine if the message type is proto-plus or protobuf - test_field = compute.ReportFaultyReservationSubBlockRequest.meta.fields[ - "reservation_sub_blocks_report_faulty_request_resource" + test_field = compute.TestIamPermissionsReservationSubBlockRequest.meta.fields[ + "test_permissions_request_resource" ] def get_message_fields(field): @@ -3010,7 +4335,7 @@ def get_message_fields(field): # For each item in the sample request, create a list of sub fields which are not present at runtime # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime for field, value in request_init[ - "reservation_sub_blocks_report_faulty_request_resource" + "test_permissions_request_resource" ].items(): # pragma: NO COVER result = None is_repeated = False @@ -3042,48 +4367,20 @@ def get_message_fields(field): if subfield: if field_repeated: for i in range( - 0, - len( - request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field] - ), + 0, len(request_init["test_permissions_request_resource"][field]) ): - del request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field][i][subfield] + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] else: - del request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field][subfield] + del request_init["test_permissions_request_resource"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], ) # Wrap the value into a proper Response obj @@ -3091,41 +4388,20 @@ def get_message_fields(field): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.report_faulty(request) + response = client.test_iam_permissions(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_report_faulty_rest_interceptors(null_interceptor): +def test_test_iam_permissions_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -3139,18 +4415,18 @@ def test_report_faulty_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_report_faulty" + transports.ReservationSubBlocksRestInterceptor, "post_test_iam_permissions" ) as post, mock.patch.object( transports.ReservationSubBlocksRestInterceptor, - "post_report_faulty_with_metadata", + "post_test_iam_permissions_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_report_faulty" + transports.ReservationSubBlocksRestInterceptor, "pre_test_iam_permissions" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ReportFaultyReservationSubBlockRequest.pb( - compute.ReportFaultyReservationSubBlockRequest() + pb_message = compute.TestIamPermissionsReservationSubBlockRequest.pb( + compute.TestIamPermissionsReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -3162,19 +4438,21 @@ def test_report_faulty_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) req.return_value.content = return_value - request = compute.ReportFaultyReservationSubBlockRequest() + request = compute.TestIamPermissionsReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata - client.report_faulty( + client.test_iam_permissions( request, metadata=[ ("key", "val"), @@ -3214,6 +4492,26 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyReservationSubBlockRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_list_empty_call_rest(): @@ -3276,6 +4574,48 @@ def test_report_faulty_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyReservationSubBlockRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsReservationSubBlockRequest() + + assert args[0] == request_msg + + def test_reservation_sub_blocks_base_transport_error(): # Passing both a credentials object and credentials_file should raise an error with pytest.raises(core_exceptions.DuplicateCredentialArgs): @@ -3299,9 +4639,12 @@ def test_reservation_sub_blocks_base_transport(): # raise NotImplementedError. methods = ( "get", + "get_iam_policy", "list", "perform_maintenance", "report_faulty", + "set_iam_policy", + "test_iam_permissions", ) for method in methods: with pytest.raises(NotImplementedError): @@ -3442,6 +4785,9 @@ def test_reservation_sub_blocks_client_transport_session_collision(transport_nam session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 session1 = client1.transport.list._session session2 = client2.transport.list._session assert session1 != session2 @@ -3451,6 +4797,12 @@ def test_reservation_sub_blocks_client_transport_session_collision(transport_nam session1 = client1.transport.report_faulty._session session2 = client2.transport.report_faulty._session assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 def test_common_billing_account_path(): diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py index ce61ce4d00a1..b9f16a7bd62a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py @@ -4348,6 +4348,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "disk_consistency_group_policy": {}, "group_placement_policy": { + "accelerator_topology_mode": "accelerator_topology_mode_value", "availability_domain_count": 2650, "collocation": "collocation_value", "gpu_topology": "gpu_topology_value", @@ -4414,6 +4415,7 @@ def test_insert_rest_call_success(request_type): "status": "status_value", "workload_policy": { "accelerator_topology": "accelerator_topology_value", + "accelerator_topology_mode": "accelerator_topology_mode_value", "max_topology_distance": "max_topology_distance_value", "type_": "type__value", }, @@ -4802,6 +4804,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "disk_consistency_group_policy": {}, "group_placement_policy": { + "accelerator_topology_mode": "accelerator_topology_mode_value", "availability_domain_count": 2650, "collocation": "collocation_value", "gpu_topology": "gpu_topology_value", @@ -4868,6 +4871,7 @@ def test_patch_rest_call_success(request_type): "status": "status_value", "workload_policy": { "accelerator_topology": "accelerator_topology_value", + "accelerator_topology_mode": "accelerator_topology_mode_value", "max_topology_distance": "max_topology_distance_value", "type_": "type__value", }, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py index 2f9506f932c7..33bfe6e759ad 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py @@ -4396,6 +4396,7 @@ def test_insert_rest_call_success(request_type): { "consumer_network": "consumer_network_value", "endpoint": "endpoint_value", + "endpoint_with_id": "endpoint_with_id_value", "nat_ips": ["nat_ips_value1", "nat_ips_value2"], "propagated_connection_count": 2878, "psc_connection_id": 1793, @@ -4406,6 +4407,7 @@ def test_insert_rest_call_success(request_type): "consumer_accept_lists": [ { "connection_limit": 1710, + "endpoint_url": "endpoint_url_value", "network_url": "network_url_value", "project_id_or_num": "project_id_or_num_value", } @@ -4822,6 +4824,7 @@ def test_patch_rest_call_success(request_type): { "consumer_network": "consumer_network_value", "endpoint": "endpoint_value", + "endpoint_with_id": "endpoint_with_id_value", "nat_ips": ["nat_ips_value1", "nat_ips_value2"], "propagated_connection_count": 2878, "psc_connection_id": 1793, @@ -4832,6 +4835,7 @@ def test_patch_rest_call_success(request_type): "consumer_accept_lists": [ { "connection_limit": 1710, + "endpoint_url": "endpoint_url_value", "network_url": "network_url_value", "project_id_or_num": "project_id_or_num_value", } diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py index 5d125119218e..7041b4034169 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py @@ -1004,6 +1004,7 @@ def test_aggregated_list_rest_required_fields( "page_token", "return_partial_success", "service_project_number", + "views", ) ) jsonified_request.update(unset_fields) @@ -1070,6 +1071,7 @@ def test_aggregated_list_rest_unset_required_fields(): "pageToken", "returnPartialSuccess", "serviceProjectNumber", + "views", ) ) & set(("project",)) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py new file mode 100644 index 000000000000..e25ac3f3713e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py @@ -0,0 +1,4286 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.zone_vm_extension_policies import ( + ZoneVmExtensionPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(None) is None + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + ZoneVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + ZoneVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ZoneVmExtensionPoliciesClient._get_client_cert_source(None, False) is None + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain(None, None) + == ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + ZoneVmExtensionPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = ZoneVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = ZoneVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (ZoneVmExtensionPoliciesClient, "rest"), + ], +) +def test_zone_vm_extension_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.ZoneVmExtensionPoliciesRestTransport, "rest"), + ], +) +def test_zone_vm_extension_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (ZoneVmExtensionPoliciesClient, "rest"), + ], +) +def test_zone_vm_extension_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_zone_vm_extension_policies_client_get_transport_class(): + transport = ZoneVmExtensionPoliciesClient.get_transport_class() + available_transports = [ + transports.ZoneVmExtensionPoliciesRestTransport, + ] + assert transport in available_transports + + transport = ZoneVmExtensionPoliciesClient.get_transport_class("rest") + assert transport == transports.ZoneVmExtensionPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(ZoneVmExtensionPoliciesClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(ZoneVmExtensionPoliciesClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + "true", + ), + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_zone_vm_extension_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [ZoneVmExtensionPoliciesClient]) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + with pytest.raises(ValueError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + + +@pytest.mark.parametrize("client_class", [ZoneVmExtensionPoliciesClient]) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +def test_zone_vm_extension_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_zone_vm_extension_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetZoneVmExtensionPolicyRequest): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_get_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListZoneVmExtensionPoliciesRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "zone", + ) + ) + ) + + +def test_list_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListZoneVmExtensionPoliciesRequest(), + project="project_value", + zone="zone_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + ], + next_page_token="abc", + ), + compute.VmExtensionPolicyList( + items=[], + next_page_token="def", + ), + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + ], + next_page_token="ghi", + ), + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.VmExtensionPolicyList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "zone": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.VmExtensionPolicy) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_update_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_rest_required_fields( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_update_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update( + compute.UpdateZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_update_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_unary_rest_required_fields( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_update_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_unary( + compute.UpdateZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ZoneVmExtensionPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = ZoneVmExtensionPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_delete_rest_bad_request( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteZoneVmExtensionPolicyRequest.pb( + compute.DeleteZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetZoneVmExtensionPolicyRequest): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + global_resource_link="global_resource_link_value", + id=205, + kind="kind_value", + managed_by_global=True, + name="name_value", + priority=898, + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + state="state_value", + update_timestamp="update_timestamp_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.VmExtensionPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.global_resource_link == "global_resource_link_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.managed_by_global is True + assert response.name == "name_value" + assert response.priority == 898 + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + assert response.state == "state_value" + assert response.update_timestamp == "update_timestamp_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetZoneVmExtensionPolicyRequest.pb( + compute.GetZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicy.to_json(compute.VmExtensionPolicy()) + req.return_value.content = return_value + + request = compute.GetZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicy() + post_with_metadata.return_value = compute.VmExtensionPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request_init["vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "global_resource_link": "global_resource_link_value", + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "managed_by_global": True, + "name": "name_value", + "priority": 898, + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "state": "state_value", + "update_timestamp": "update_timestamp_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertZoneVmExtensionPolicyRequest.meta.fields[ + "vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["vm_extension_policy_resource"][field]) + ): + del request_init["vm_extension_policy_resource"][field][i][subfield] + else: + del request_init["vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertZoneVmExtensionPolicyRequest.pb( + compute.InsertZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListZoneVmExtensionPoliciesRequest): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListZoneVmExtensionPoliciesRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList( + etag="etag_value", + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListZoneVmExtensionPoliciesRequest.pb( + compute.ListZoneVmExtensionPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicyList.to_json( + compute.VmExtensionPolicyList() + ) + req.return_value.content = return_value + + request = compute.ListZoneVmExtensionPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicyList() + post_with_metadata.return_value = compute.VmExtensionPolicyList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_update_rest_bad_request( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.update(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.UpdateZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_update_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request_init["vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "global_resource_link": "global_resource_link_value", + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "managed_by_global": True, + "name": "name_value", + "priority": 898, + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "state": "state_value", + "update_timestamp": "update_timestamp_value", + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.UpdateZoneVmExtensionPolicyRequest.meta.fields[ + "vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["vm_extension_policy_resource"][field]) + ): + del request_init["vm_extension_policy_resource"][field][i][subfield] + else: + del request_init["vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.update(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_update_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_update" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_update_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_update" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.UpdateZoneVmExtensionPolicyRequest.pb( + compute.UpdateZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.UpdateZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.update( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListZoneVmExtensionPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_update_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.update), "__call__") as call: + client.update_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.UpdateZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +def test_zone_vm_extension_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_zone_vm_extension_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "delete", + "get", + "insert", + "list", + "update", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_zone_vm_extension_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_zone_vm_extension_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.ZoneVmExtensionPoliciesTransport() + adc.assert_called_once() + + +def test_zone_vm_extension_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + ZoneVmExtensionPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_zone_vm_extension_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.ZoneVmExtensionPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_host_no_port(transport_name): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_host_with_port(transport_name): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = ZoneVmExtensionPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = ZoneVmExtensionPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.update._session + session2 = client2.transport.update._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = ZoneVmExtensionPoliciesClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = ZoneVmExtensionPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = ZoneVmExtensionPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = ZoneVmExtensionPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = ZoneVmExtensionPoliciesClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = ZoneVmExtensionPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = ZoneVmExtensionPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = ZoneVmExtensionPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = ZoneVmExtensionPoliciesClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = ZoneVmExtensionPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.ZoneVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.ZoneVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = ZoneVmExtensionPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + )