google-cloud-compute-v1 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +14 -2
- data/proto_docs/google/api/client.rb +1 -0
- metadata +5 -5
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# The VpnTunnels API.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
attr_reader :vpn_tunnels_stub
|
|
38
41
|
|
|
@@ -112,6 +115,15 @@ module Google
|
|
|
112
115
|
@config
|
|
113
116
|
end
|
|
114
117
|
|
|
118
|
+
##
|
|
119
|
+
# The effective universe domain
|
|
120
|
+
#
|
|
121
|
+
# @return [String]
|
|
122
|
+
#
|
|
123
|
+
def universe_domain
|
|
124
|
+
@vpn_tunnels_stub.universe_domain
|
|
125
|
+
end
|
|
126
|
+
|
|
115
127
|
##
|
|
116
128
|
# Create a new VpnTunnels REST client object.
|
|
117
129
|
#
|
|
@@ -139,8 +151,9 @@ module Google
|
|
|
139
151
|
credentials = @config.credentials
|
|
140
152
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
141
153
|
# but only if the default endpoint does not have a region prefix.
|
|
142
|
-
enable_self_signed_jwt = @config.endpoint
|
|
143
|
-
|
|
154
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
155
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
156
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
144
157
|
credentials ||= Credentials.default scope: @config.scope,
|
|
145
158
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
146
159
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -154,9 +167,15 @@ module Google
|
|
|
154
167
|
config.credentials = credentials
|
|
155
168
|
config.quota_project = @quota_project_id
|
|
156
169
|
config.endpoint = @config.endpoint
|
|
170
|
+
config.universe_domain = @config.universe_domain
|
|
157
171
|
end
|
|
158
172
|
|
|
159
|
-
@vpn_tunnels_stub = ::Google::Cloud::Compute::V1::VpnTunnels::Rest::ServiceStub.new
|
|
173
|
+
@vpn_tunnels_stub = ::Google::Cloud::Compute::V1::VpnTunnels::Rest::ServiceStub.new(
|
|
174
|
+
endpoint: @config.endpoint,
|
|
175
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
176
|
+
universe_domain: @config.universe_domain,
|
|
177
|
+
credentials: credentials
|
|
178
|
+
)
|
|
160
179
|
end
|
|
161
180
|
|
|
162
181
|
##
|
|
@@ -744,9 +763,9 @@ module Google
|
|
|
744
763
|
# end
|
|
745
764
|
#
|
|
746
765
|
# @!attribute [rw] endpoint
|
|
747
|
-
#
|
|
748
|
-
#
|
|
749
|
-
# @return [::String]
|
|
766
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
767
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
768
|
+
# @return [::String,nil]
|
|
750
769
|
# @!attribute [rw] credentials
|
|
751
770
|
# Credentials to send with calls. You may provide any of the following types:
|
|
752
771
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -783,13 +802,20 @@ module Google
|
|
|
783
802
|
# @!attribute [rw] quota_project
|
|
784
803
|
# A separate project against which to charge quota.
|
|
785
804
|
# @return [::String]
|
|
805
|
+
# @!attribute [rw] universe_domain
|
|
806
|
+
# The universe domain within which to make requests. This determines the
|
|
807
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
808
|
+
# universe (usually the default "googleapis.com" universe).
|
|
809
|
+
# @return [::String,nil]
|
|
786
810
|
#
|
|
787
811
|
class Configuration
|
|
788
812
|
extend ::Gapic::Config
|
|
789
813
|
|
|
814
|
+
# @private
|
|
815
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
790
816
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
791
817
|
|
|
792
|
-
config_attr :endpoint,
|
|
818
|
+
config_attr :endpoint, nil, ::String, nil
|
|
793
819
|
config_attr :credentials, nil do |value|
|
|
794
820
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
795
821
|
allowed.any? { |klass| klass === value }
|
|
@@ -801,6 +827,7 @@ module Google
|
|
|
801
827
|
config_attr :metadata, nil, ::Hash, nil
|
|
802
828
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
803
829
|
config_attr :quota_project, nil, ::String, nil
|
|
830
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
804
831
|
|
|
805
832
|
# @private
|
|
806
833
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the aggregated_list REST call
|
|
45
57
|
#
|
|
@@ -32,6 +32,9 @@ module Google
|
|
|
32
32
|
# The ZoneOperations API.
|
|
33
33
|
#
|
|
34
34
|
class Client
|
|
35
|
+
# @private
|
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
37
|
+
|
|
35
38
|
# @private
|
|
36
39
|
attr_reader :zone_operations_stub
|
|
37
40
|
|
|
@@ -104,6 +107,15 @@ module Google
|
|
|
104
107
|
@config
|
|
105
108
|
end
|
|
106
109
|
|
|
110
|
+
##
|
|
111
|
+
# The effective universe domain
|
|
112
|
+
#
|
|
113
|
+
# @return [String]
|
|
114
|
+
#
|
|
115
|
+
def universe_domain
|
|
116
|
+
@zone_operations_stub.universe_domain
|
|
117
|
+
end
|
|
118
|
+
|
|
107
119
|
##
|
|
108
120
|
# Create a new ZoneOperations REST client object.
|
|
109
121
|
#
|
|
@@ -131,8 +143,9 @@ module Google
|
|
|
131
143
|
credentials = @config.credentials
|
|
132
144
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
133
145
|
# but only if the default endpoint does not have a region prefix.
|
|
134
|
-
enable_self_signed_jwt = @config.endpoint
|
|
135
|
-
|
|
146
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
147
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
148
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
136
149
|
credentials ||= Credentials.default scope: @config.scope,
|
|
137
150
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
138
151
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -142,7 +155,12 @@ module Google
|
|
|
142
155
|
@quota_project_id = @config.quota_project
|
|
143
156
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
144
157
|
|
|
145
|
-
@zone_operations_stub = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::ServiceStub.new
|
|
158
|
+
@zone_operations_stub = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::ServiceStub.new(
|
|
159
|
+
endpoint: @config.endpoint,
|
|
160
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
161
|
+
universe_domain: @config.universe_domain,
|
|
162
|
+
credentials: credentials
|
|
163
|
+
)
|
|
146
164
|
end
|
|
147
165
|
|
|
148
166
|
# Service calls
|
|
@@ -514,9 +532,9 @@ module Google
|
|
|
514
532
|
# end
|
|
515
533
|
#
|
|
516
534
|
# @!attribute [rw] endpoint
|
|
517
|
-
#
|
|
518
|
-
#
|
|
519
|
-
# @return [::String]
|
|
535
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
536
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
537
|
+
# @return [::String,nil]
|
|
520
538
|
# @!attribute [rw] credentials
|
|
521
539
|
# Credentials to send with calls. You may provide any of the following types:
|
|
522
540
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -553,13 +571,20 @@ module Google
|
|
|
553
571
|
# @!attribute [rw] quota_project
|
|
554
572
|
# A separate project against which to charge quota.
|
|
555
573
|
# @return [::String]
|
|
574
|
+
# @!attribute [rw] universe_domain
|
|
575
|
+
# The universe domain within which to make requests. This determines the
|
|
576
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
577
|
+
# universe (usually the default "googleapis.com" universe).
|
|
578
|
+
# @return [::String,nil]
|
|
556
579
|
#
|
|
557
580
|
class Configuration
|
|
558
581
|
extend ::Gapic::Config
|
|
559
582
|
|
|
583
|
+
# @private
|
|
584
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
560
585
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
561
586
|
|
|
562
|
-
config_attr :endpoint,
|
|
587
|
+
config_attr :endpoint, nil, ::String, nil
|
|
563
588
|
config_attr :credentials, nil do |value|
|
|
564
589
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
565
590
|
allowed.any? { |klass| klass === value }
|
|
@@ -571,6 +596,7 @@ module Google
|
|
|
571
596
|
config_attr :metadata, nil, ::Hash, nil
|
|
572
597
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
573
598
|
config_attr :quota_project, nil, ::String, nil
|
|
599
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
574
600
|
|
|
575
601
|
# @private
|
|
576
602
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the delete REST call
|
|
45
57
|
#
|
|
@@ -32,6 +32,9 @@ module Google
|
|
|
32
32
|
# The Zones API.
|
|
33
33
|
#
|
|
34
34
|
class Client
|
|
35
|
+
# @private
|
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
37
|
+
|
|
35
38
|
# @private
|
|
36
39
|
attr_reader :zones_stub
|
|
37
40
|
|
|
@@ -100,6 +103,15 @@ module Google
|
|
|
100
103
|
@config
|
|
101
104
|
end
|
|
102
105
|
|
|
106
|
+
##
|
|
107
|
+
# The effective universe domain
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
#
|
|
111
|
+
def universe_domain
|
|
112
|
+
@zones_stub.universe_domain
|
|
113
|
+
end
|
|
114
|
+
|
|
103
115
|
##
|
|
104
116
|
# Create a new Zones REST client object.
|
|
105
117
|
#
|
|
@@ -127,8 +139,9 @@ module Google
|
|
|
127
139
|
credentials = @config.credentials
|
|
128
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
129
141
|
# but only if the default endpoint does not have a region prefix.
|
|
130
|
-
enable_self_signed_jwt = @config.endpoint
|
|
131
|
-
|
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
132
145
|
credentials ||= Credentials.default scope: @config.scope,
|
|
133
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
134
147
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -138,7 +151,12 @@ module Google
|
|
|
138
151
|
@quota_project_id = @config.quota_project
|
|
139
152
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
140
153
|
|
|
141
|
-
@zones_stub = ::Google::Cloud::Compute::V1::Zones::Rest::ServiceStub.new
|
|
154
|
+
@zones_stub = ::Google::Cloud::Compute::V1::Zones::Rest::ServiceStub.new(
|
|
155
|
+
endpoint: @config.endpoint,
|
|
156
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
157
|
+
universe_domain: @config.universe_domain,
|
|
158
|
+
credentials: credentials
|
|
159
|
+
)
|
|
142
160
|
end
|
|
143
161
|
|
|
144
162
|
# Service calls
|
|
@@ -342,9 +360,9 @@ module Google
|
|
|
342
360
|
# end
|
|
343
361
|
#
|
|
344
362
|
# @!attribute [rw] endpoint
|
|
345
|
-
#
|
|
346
|
-
#
|
|
347
|
-
# @return [::String]
|
|
363
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
364
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
365
|
+
# @return [::String,nil]
|
|
348
366
|
# @!attribute [rw] credentials
|
|
349
367
|
# Credentials to send with calls. You may provide any of the following types:
|
|
350
368
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -381,13 +399,20 @@ module Google
|
|
|
381
399
|
# @!attribute [rw] quota_project
|
|
382
400
|
# A separate project against which to charge quota.
|
|
383
401
|
# @return [::String]
|
|
402
|
+
# @!attribute [rw] universe_domain
|
|
403
|
+
# The universe domain within which to make requests. This determines the
|
|
404
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
405
|
+
# universe (usually the default "googleapis.com" universe).
|
|
406
|
+
# @return [::String,nil]
|
|
384
407
|
#
|
|
385
408
|
class Configuration
|
|
386
409
|
extend ::Gapic::Config
|
|
387
410
|
|
|
411
|
+
# @private
|
|
412
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
388
413
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
389
414
|
|
|
390
|
-
config_attr :endpoint,
|
|
415
|
+
config_attr :endpoint, nil, ::String, nil
|
|
391
416
|
config_attr :credentials, nil do |value|
|
|
392
417
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
393
418
|
allowed.any? { |klass| klass === value }
|
|
@@ -399,6 +424,7 @@ module Google
|
|
|
399
424
|
config_attr :metadata, nil, ::Hash, nil
|
|
400
425
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
401
426
|
config_attr :quota_project, nil, ::String, nil
|
|
427
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
402
428
|
|
|
403
429
|
# @private
|
|
404
430
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the get REST call
|
|
45
57
|
#
|
|
@@ -21,6 +21,7 @@ module Google
|
|
|
21
21
|
module Api
|
|
22
22
|
# Required information for every language.
|
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
|
24
25
|
# @return [::String]
|
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-compute-v1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gapic-common
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.21.1
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: 2.a
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.
|
|
29
|
+
version: 0.21.1
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 2.a
|
|
@@ -751,7 +751,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
751
751
|
- !ruby/object:Gem::Version
|
|
752
752
|
version: '0'
|
|
753
753
|
requirements: []
|
|
754
|
-
rubygems_version: 3.
|
|
754
|
+
rubygems_version: 3.5.3
|
|
755
755
|
signing_key:
|
|
756
756
|
specification_version: 4
|
|
757
757
|
summary: API Client library for the Google Cloud Compute V1 API
|